Document.insertField(String MergeField) throws NullPointerException

Trying to parse the attached docx and trying to replace the markedfield in docx with mergefield.

With Aspose 14.6.0, same document is going through fine.

But with 15.2.0, it is throwing a NullPointerException.

Say for example, in attached docx, Account summary table, second row has amountPaid for which 15.2.0 is throwing NullPointerException.

We think the problem is occurring in the method documentBuilder.insertField(“fieldText”); can you please specify the modifications you made from 14.6.0 to 15.2.0 in this method.

15.2.0 was giving issues as above mentioned. But, it worked fine with 15.3.0. I am not sure about the difference between these two versions. Can you please help here and explain?

Hi Sharon,

Thanks for your inquiry. We
always encourage our customers to use the latest version of
Aspose.Words as it contains newly introduced features, enhancements and
fixes to the issues that were reported earlier.

Please check the detail of Aspose.Words versions from here:
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

Please check the release notes of Aspose.Words for Java 15.3.0 from here:
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/entry618875.aspx

Hope this answers your query. Please let us know if you have any more queries.