We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Mail merge issue with Essential Studio v9.3.0.61

Thread ID:





100822 Sep 8,2011 09:02 AM UTC Sep 12,2011 08:10 AM UTC ASP.NET Web Forms (Classic) 1
Tags: DocIO
William Beacon
Asked On September 8, 2011 09:02 AM UTC


I'm attempting to evaluate v9.3.0.61 of Essential studio. We are already using the .Net 3.5 assemblies in v7.3.0.20 but are looking to upgrade to the latest version.

We're using Word document templates, and then populating the templates with data using the MailMerge.Execute() method.

Our code loops through each merge field to be populated in the template, and merges the data, one field at a time. So the Mail.Merge.Execute() is called for each merge field, rather than building arrays all the merge fields and values to be populated and then calling the MailMerge.Execute() method once, passing in the arrays.

The v7.3.0.20 assemblies would allow us to do this, and we would have no problems with populating the templates with data.

However, when using the v9.3.0.61 assemblies we've found that only the first merge field in the loop will be populated correctly in the document. It seems as though when the first merge takes place, the other merge fields in the template are removed or disregarded as no other merged data appears in the template.

So, my question is, has something changed with the underlying code in the MailMerge.Execute() method between v7.3.0.20 and v9.3.0.61? Are we now required to build the arrays of fields and values to merge and call the MailMerge.Execute() once, or would we still be able to call the MailMerge.Execute() multiple times on the same document without affecting the as yet un-merged fields in the document?

Any assistance would be appreciated - I would like to avoid having to re-write a lot of our code!

Many thanks.

Poornima R [Syncfusion]
Replied On September 12, 2011 08:10 AM UTC

Hi William,

Thank you for your interest in Syncfusion products.

The document.MailMerge.Execute method updates all the occurrence of the specified merge field in document and clears all other unmatched merge fields from the documents. For merging the fields one at a time you can make use of the overload method - Execute(string[ ] fieldNames, string[ ] fieldValues).
DocIO has a Boolean property document.MailMerge.ClearFields (by default it is set as true) which removes all the unmatched mail merge fields from the document while mail merging. We have to set document.MailMerge.ClearFields property as false, to preserve the unmatched mail merge fields in the document before calling document.MailMerge.Execute method.

We have prepared a sample to illustrate your requirement of mail merging without removing the unmatched mail merge fields in the document. Please do find the sample from the following location.

Sample Link:

For more information regarding mail merge functionality of DocIO, please refer the following User guideline link:


There is no change in the functionality of Execute() method from 7.3 to current release. Could you please share us your sample application and assemblies used (7.3 version) to reproduce the mentioned issue on our side.

Please let us know if you have any other questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon