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

Free Support Forum - aspose.com

Populate Mail Merge Fields with Values & Convert Word DOCX Document to PDF (C# .NET)

I have a DOCX template and I fill their MergeFields with MailMerge method correctly. I have to convert the resulting DOCX to PDF, but when I do it I lose the MergeFields values (appears empty).

I have tested your online tool and I get the same result:

What can I do?


Please try to call Document.UpdatePageLayout Method before saving to PDF. In case the problem still remains, then please compress the following resources into ZIP format and attach the .zip file here for testing:

  • A simplified Template Word document
  • Aspose.Words generated DOCX file showing the desired output
  • Aspose.Words generated PDF file showing the undesired results
  • Please also create a standalone simplified Console Application (source code without compilation errors) that helps us to reproduce this problem on our end and attach it here for testing. Please do not include DLL files in it to reduce the file size.

As soon as you get these pieces of information ready, we will then start investigation into your particular issue and provide you more information.