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 fields within IF fieldcode in DocIO for v20.2 and above

Hi, 

Need a workaround for Merge fields in the IF field expression. Not sure whether DocIO currently process the merge fields within the fieldcode of If fields. 

There is a similar thread - https://www.syncfusion.com/forums/121128/if-conditions-in-mailmerge-template?reply=lEp3NS , but this not compatible with latest versions. 

If anyone has a solution, kindly share. 


Thanks & Regards, 

Hari 



3 Replies 1 reply marked as answer

AN Anto Nihil Sahaya Raj Syncfusion Team October 20, 2022 02:06 PM UTC

Hi Hari,

Essential DocIO library process the merge fields within the field code of If fields.

From v16.1.0.24, we have migrated the field to the new structure. So, you have faced the problem in that old sample code example which has the old field structure.

Please refer the below link to know more about this migration,
https://help.syncfusion.com/file-formats/release-notes/migratingtov16.1.0.24


We have prepared the sample application in the latest version to process the merge fields within the field code of If fields as per your requirement and it can be downloaded from the below link.
https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample-2029884514

Please refer our UG documentation link to know more about mail merge in the Word document.
https://help.syncfusion.com/file-formats/docio/working-with-mail-merge

Regards,
Anto Nihil S

If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Marked as answer

HM HARIKRISHNAN MP October 21, 2022 06:28 AM UTC

Hi Anto, 

Thanks for your input. The sample works perfect. 

Further to your sample, If I may ask - what can be done to include merge fields as a true or false statement in the IF field. 

i.e. { IF 1=1 <<MergeField>> False } - I want to show the true expression as a merge field value. 


Regards, 

Hari 




SB Suriya Balamurugan Syncfusion Team October 24, 2022 07:14 AM UTC

Hi Hari,

From the given details, we have found that your requirement is to include merge fields as a true or false statement in the IF field.

We have prepared the sample application to show the true expression as a merge field value as per your requirement and it can be downloaded from the below attachment.

Regards,
Suriya Balamurugan.


Attachment: MergeField_In_True_Expression_c2c56d94.zip

Loader.
Live Chat Icon For mobile
Up arrow icon