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

Free Support Forum - aspose.com

Aspose.Words.MailMerged failed to merge context

MailMerge.execute() did not merge the fields with content for the attached document.

Hi Caifang,


Thanks for your inquiry. After an initial test with Aspose.Words for Java 14.12.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

I have used the following code for testing:

Document doc = new Document(getMyDir()
“reprodoc.docx”);

doc.getMailMerge().execute(new String[] { "institutionName", "ID", "ApprovalDate" }, new Object[] { "some name", "2", "some date" });

doc.save(getMyDir() + “out.docx”);


Best regards,