Use Mail Merge to Create Reports & Fill Templates with Data from Data Sources

I am experiencing a problem where a NullReferenceException is being thrown from within Aspose.Words when performing a MailMerge of a particular document.

I have attached a zip file that contains a .Net project that replicates the issue, including mail merge data and a Word document that is reduced to the minimum contents required to demonstrate the exception.

We have experienced the problem with version 11.9 and 13.2.

Please could someone have a look at this?

Hi Darren,


Thanks for your inquiry. I ran your sample project on my side without any change and was unable to observe any such exception. Could you please double check if you included the correct template Word document?

Best regards,

Thank you very much for looking at this. I thought I had managed to make it so simple that there would be no problem for you reproducing it!

However, I tried it on a totally different machine and also didn't get an exception with version 13.2. When I referenced 11.9, however, I did get an exception.

Going back to my development machine, it looks like .Net Reflector was somehow getting in the way and causing the exception to be thrown for both versions. When I switched off Reflector's debugging for Aspose.Words and cleared out the cache, I didn't get the exception with 13.2, but still got it with 11.9.

So... the result is that the problem looks like it has been resolved in some version between 11.9 and 13.2.

Thanks again.

Hi Darren,


Thanks for the additional information. Yes, it might well be the case that the exception is no longer reproducible with 13.2.0; we release a new version of Aspose.Words at the end of every month and would suggest you please always use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes to many issues that are reported earlier. Anyways, it’s great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,