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.
Unfortunately, activation email could not send to your email. Please try again.

No empty lines in address block (Mailmerge DocIO)

Thread ID:

Created:

Updated:

Platform:

Replies:

121094 Nov 10,2015 07:11 AM Nov 13,2015 01:20 AM ASP.NET Web Forms 3
loading
Tags: DocIO
Christian Zeder
Asked On November 10, 2015 07:11 AM

Hi,

I'm using the mailmerge feature from Syncfusion DocIO. In Word I try to create a simple address block like the sample below. It contains some mergefields and works fine.

«Lastname» «Firstname»
«Address1»
«Address2»
«ZipCode» «City»

{ MERGEFIELD Lastname \* MERGEFORMAT } { MERGEFIELD Firstname \* MERGEFORMAT } 
{ MERGEFIELD Address1 \* MERGEFORMAT } 
{ MERGEFIELD Address2 \* MERGEFORMAT } 
{ MERGEFIELD ZipCode \* MERGEFORMAT } { MERGEFIELD City \* MERGEFORMAT } 

But when a data record has an empty Address1 or Address2, no line should be empty in the address block. In this case next mergefield should follow. In Word it's possible to solve it with "\f", another wayis to create a IF THEN field. With DocIO both options doesn't work.

{ MERGEFIELD Lastname \* MERGEFORMAT } { MERGEFIELD Firstname \* MERGEFORMAT } 
{ MERGEFIELD Address1 \f \* MERGEFORMAT } 
{ MERGEFIELD Address2 \f \* MERGEFORMAT } 
{ MERGEFIELD ZipCode \* MERGEFORMAT } { MERGEFIELD City \* MERGEFORMAT } 

How can I do this? Thanks a lot for your help.

Kind regards
Christian

Pradeep Loganathan [Syncfusion]
Replied On November 11, 2015 04:56 AM

Hi Christian,

Thank you for interest in Syncfusion products.

By enabling MailMerge.RemoveEmptyParagraphs option, then there is no empty paragraph(s) in your document. If the data table contains empty data record while performing mail merge process.
Please refer to the following UG documentation for how to use this option in DocIO:
http://help.syncfusion.com/file-formats/docio/working-with-mailmerge#removing-empty-merge-fields
Please let us know if you have any concerns on this.
Thanks,
Pradeep L

Christian Zeder
Replied On November 12, 2015 11:45 AM

Hi Pradeep 

Thanks a lot, it works.

Kind regards
Christian 

Suganya Rathinam [Syncfusion]
Replied On November 13, 2015 01:20 AM

Hi Christian,

Thank you for your update. Please let us know if you have any other questions. We will be happy to assist you as always.

Regards,
Suganya


CONFIRMATION

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.

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.

;