Perform Microsoft Word Mail Merge on Salesforce using Aspose.Words REST API issue

We are using Aspose to generate PDF and Word documents. We are using Aspose in cloud from SFDC. This was working fine all this while but we started getting an issue since today morning. The error that we get from API call is below. We had similar issue in past which fixed itself. But today this error is still persisting in our production environment.







System.HttpResponse[Status=Bad Request, StatusCode=400]

Response Body {“Message”:“Object reference not set to an instance of an object.”}

URL https://api.aspose.com/v1.1/words/Service%20Contract.docx/executeTemplate?storage=tpco.salesnet.contracts.sandbox&folder=&filename=00DV0000006tKO4MAM/001V000000MJH3dIAH/ThomasNet__Service_Contract-Media_New_Contract_011120171484147152623.docx&cleanup=ContainingFields,EmptyParagraphs,UnusedFields,UnusedRegions&format=pdf



More information from Aspose logs



Error: Object reference not set to an instance of an object… Method: Populate document template with data.

Hi there,

Thanks for your inquiry. Could you please attach your input Word document and xml that you used for mail merge here for testing? We will investigate the issue on our side and provide you more information.

Attached are the requested files.

Hi there,

Thanks for sharing the detail.

We have tested the scenario using executeTemplate resource and have not found the shared issue. Please check the attached output Pdf.
Hi there,

Thanks for your inquiry via email. We have tested the scenario again with shared Json string and template document. We have not found the shared issue. Please make sure that you are using the same document and Json string shared in this forum thread.