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

Suppress or remove a row if field is empty

Hi

Is there a way 
1.  To remove  a row if the merge field is empty?
2. Suppress line feed if merge fields is empty ?

Thank you
Sanjay


2 Replies

MJ Mohanaselvam Jothi Syncfusion Team June 10, 2019 11:25 AM UTC

Hi Sanjay,

Thank you for contacting Syncfusion support.

Regarding To remove a row if the merge field is empty:
To meet this requirement, we suggest you to get the row of current merge field (which has empty value) using MergeFieldEventHandler and remove the row from table.

Regarding Suppress line feed if merge fields is empty:
To meet this requirement, we suggest you to get the paragraph of current merge field (which has empty value) and insert line break in the Word document.

We have prepared a sample for above both requirements and it can be downloaded from the below link:
http://www.syncfusion.com/downloads/support/forum/145140/ze/Sample-1455086070

Note: Please find the input Word document in “wwwroot\Data” folder of above sample application.

Please refer the below documentation to know more about working with mail merge in Word document using DocIO:
https://help.syncfusion.com/file-formats/docio/working-with-mailmerge

Regards,
Mohanaselvam J 



SA Sanjay July 8, 2019 08:22 AM UTC

Hi

Thank you . This is now working 

Regards

Loader.
Live Chat Icon For mobile
Up arrow icon