We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

MS Word Mailmerge Changes Font

Hi there,

We are using Document.MailMerge (of Aspose.Words.Document) facility to merge MS Word .docx documents, and during the process fonts gets changed from Arial to Times New Roman. I believe aspose library is changing the fonts. I have followed the recommendation in below link, however it didn’t work.
https://forum.aspose.com/t/50748

I have also tried [FontSettings.DefaultFontName] but it hasn’t helped.

Our mail merge process merges three other documents to mainbody.docx (header.docx, footer.docx, address.docx). All the merged document remains with Arial fonts however mainbody.docx changes from Arial to Times New Roman.

How do I force it to be in Arial font.

Please let me know if above description helps and anyone needs more information.

Regards,
Bhargav

Hi Bhargav,

Thanks for your inquiry. In case you are using an older version of Aspose.Words, we would suggest you please upgrade to the latest version (v15.12.0) from here and let us know how it goes on your side. If the problem still remains, please share following detail for investigation purposes.


  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple application (for example a Console
    Application Project
    ) that demonstrates the code (Aspose.Words code) you used to generate
    your output document

  • Please attach the output Word file that shows the undesired behavior.

Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

Hi Tahir,

Thanks for the quick response. We are currently on v15.7.0.0 of Aspose.Words.dll; I will talk to my team and see if we can upgrade it to the latest version.

Meanwhile, I will create a sample console app and send you details as per your request.

Regards,
Bhargav

Hi Bhargav,

Thanks for your feedback. Please upgrade to the latest version of Aspose.Words for .NET 15.12.0. If you still face problem, please share the requested detail. We will investigate the issue on our side and provide you more information.


Hi Tahir,

Library upgrade seems to have fixed the issue. I also had to change NodeImporter settings to keep the source formatting instead of using formatting of destination document.
NodeImporter(srcDoc, dstDoc, ImportFormatMode.UseDestinationStyles);
to
NodeImporter(srcDoc, dstDoc, ImportFormatMode.KeepSourceFormatting)
Even though both document had Arial font, the inserted document lost its formatting and changed to Times New Roman.

Thanks for the help. We can close this issue now.

Regards,
Bhargav