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
      wp.Clear;
      wp.DefaultAttr.SetFontName('Raleway');
      wp.WritingAttr.Clear;
      wp.loadfromfile(changeFileExt(application.exename, '.docx'));
      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.