Load from DOCX - Font

  • Hello,


    i licensed the docx plugin which works well for importing a docx template. Just the font of the template is always replaced by Arial also if I set the font as base font of the WPRichtect before and after loading the docment. I would be grateful if you could help me understand what I have to do.

  • This is what I do:


    Code
    1. wp.Clear;
    2. wp.DefaultAttr.SetFontName('Raleway');
    3. wp.WritingAttr.Clear;
    4. wp.loadfromfile(changeFileExt(application.exename, '.docx'));
    5. wp.MergeTextEx('', '', wpobjBookmark, [wpmergeAllTexts]);

    So the code helped a lot. But I would like to get rid of having to set the default font. It does not use the fonts from the docx file. Am I missing something? If I omit setting the Font, it uses Arial.