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. Image for the cookie policy date

Mail merge with check box form field

Is it possible to have a check box form field inside a document whose state (checked/uncheckd) is bound to a database merge field?
I need the checkbox form field to survive the merge process and be presente in the output document so that the document user may change the checkbox state if needed.

Thanks for your help.

8 Replies

MK Madhankumar K Syncfusion Team June 22, 2012 11:22 AM UTC

Hi Arturo,

Thank you for your interest in Syncfusion products.

We could not able to perform mail merge with check box form field in the document because mail merge operation can be done using table column name and mail merge field name.

We have prepared the sample for changing the check box state during mail merge operation using Essential DOCIO.

Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

Please let us know if you have any other questions.

Regards,
Madhankumar



Sample_eb7fb524.zip


AB Arturo Buonanni July 11, 2012 12:43 PM UTC

I've examined your sample and found it very userfull.
If I understand it well, you have attached a new event hander to the MailMerge event in wich you set the checkbox state based on the text to be put in "Choice1" MailMerege fields.
This will work but will also fill the mail merge field "Choice1" in the final document. Am I correct?
How do I remove the "Choice1" field from the result (it's useless as it would be a duplicate of the checkbox)?


RM Ramkumar M Syncfusion Team July 12, 2012 09:01 AM UTC

Hi Arturo,

Thank you for your update.

We have modified the sample to remove duplicate "Choice1" field from result by checking the FiledName property of MergeFieldEventArgs in the mailmerge event. Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

Please let us know if you have any other questions.

Regards,
Ramkumar



Sample_90ddce51.zip


AB Arturo Buonanni July 13, 2012 02:15 PM UTC

I've looked into this new sample and found it answers all my questions.
It's very helpfull.

Thank you very much for your quick reply.


RM Ramkumar M Syncfusion Team July 14, 2012 07:36 PM UTC

Hi Arturo,

You're welcome. Please let us know if you have any other questions.

Regards,

Ramkumar



BA Badri March 26, 2014 03:41 PM UTC

I am unable to download the samples provided here. can you please re-attach them?



MS Milton Santos replied to Badri May 11, 2020 07:05 PM UTC

I am unable to download the samples provided here. can you please re-attach them?



Hi, I have a question and I would like to know if you can help me. I have a template in Microsoft Word that has a checkbox. And how can I use mergefield in this case? My solution is made in .NET console.


MR Manikandan Ravichandran Syncfusion Team May 12, 2020 04:16 PM UTC

Hi Arturo,

Thank you for your update.

From the given details, we have found that your requirement is to perform mail merge with Check box form field. We have prepared the sample for your requirement which can be downloaded from the following link.
https://www.syncfusion.com/downloads/support/forum/104050/ze/GenerateWord-1505366532

In this sample, we have done the following.
1. Load the template document.
2. Initialize the mail merge event handler.
3. Perform mail merge using Execute Overload.
4. In mail merge event, set check box field as true based on the mail merge field value.
5. Save the word document and close.

If we misunderstood any of your requirement, please share the complete requirement and modified sample of above or complete runnable sample along with the input word document and expected output document. So that we will validate and provide the solution earlier.

Please let us know if you have any further questions.

Regards,
Manikandan Ravichandran


Loader.
Live Chat Icon For mobile
Up arrow icon