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
close icon

Mail Merge and IF Fields

I have a particular issue that I was hoping to get some advice on. I've attached a sample project and two sample documents for this issue. The MergeDoc.dot file has three merge fields and a IF field that contains the second merge field as part of the if condition. When using the Word merge feature with the supplied data.doc (as the data source) the IF field is updated with the correct value and unlinked. When I perform this merge with DocIO the IF field is not updated correctly and is also not unlinked (there is also a problem with how DocIO merges the value into the merge field within the IF field, but I believe this has already been recognised as a defect). Is there a reason why this happens? And can you offer suggestions as to how to achieve these results without having to resort to opening the document in Word after the DocIO merge?



SyncfusionMergeTest_694adf99.zip

1 Reply

BP Bhuvaneswari P Syncfusion Team June 5, 2009 06:09 AM UTC

Hi Chris,

Thank you for your interest in Syncfusion products.

1. When merging a document that contains an IF field that has a merge field as part of the condition the merge field text is merged without surrounding quotes. It also appears to merge the text with a leading white space character.

Merge field text is merged without surrounding quotes is not an issue. Since there are no quotes in the source document, it didn't display the quotes in the output document after merge the field.

I am able to reproduce the issue 'When merging the field inside if condition, the text display with a leading white space character'. The issue has been fixed and its included in our latest development builds. Please download latest development build 7.2.0.5 from the below location:

http://www.syncfusion.com/downloads/development-builds


2. Evaluate the IF field
I am able to see the behavior. This is the expected behavior of DocIO. We can merge the fields inside the if-condition, but updating fields is done only after opened in MS word and updating the fields by pressing F9. Fields updating has been done only in MS word, we can’t do this programmatic ally using DocIO. So it’s not possible to evaluate the IF-field.

Please let me know if you need any further information regarding this.

Best Regards,
Bhuvana

Loader.
Live Chat Icon For mobile
Up arrow icon