Free Support Forum -

Merging XML data onto a template File

I have an XML in a particular format and have created .docx template with merge fields and am trying the mailmerge.execute and mailmerge.executewithregions and both don't seem to work. I do not get an error but no merge happens. I have attached the XML file and Template. Please let me know what is going on.

Hi there,

Thanks for your inquiry.

Your template contains no regions (TableStart and TableEnd merge fields) so you would only be using MailMerge.Execute. However, I’m afraid the structure of your data source is incorrect which is the reason for mail merge not working.

Please the following article for details on executing simple mail merge from an XML data source:

You can also find the full code and input documents in the sample archive:


thanks for the reply. but our format cannot be modified. so this will not work on this XML format, i assume?


Thanks for your inquiry. I think, in your case, you can use IMailMergeDataSource. Please see the following link to learn more

Hope this helps.

Best regards,