Free Support Forum - aspose.com

Mail Merge Region - two line breaks are added after each child record

Hello there,

I am calling MailMerge.ExecuteWithRegions(ds), but for the region containing child records
<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–>


<> <> <>


above section is replaced as MergeFields at run time, so will look like:

«TableStart:Vendors»
«VTitle» «VForename» «VSurname»
«TableEnd:Vendors»


But when I run mail merge, output document is showing this section as:

Joe Jenkins

Steve Bates


with two line breaks added after each record.


Could you please guide me how I can avoid these extra line breaks in output document.


Thank you!


P.S. Input/Output docs attached.


Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. I think, you should just insert TableStart and TableEnd mergefield in the same paragraph as shown below:

«TableStart:Vendors»«VTitle» «VForename» «VSurname»«TableEnd:Vendors»

Hope this helps.

Best regards.

Thanks for you reply.

When you say in the same paragraph, do you mean the same line.

If yes, it might not be possible every time as requirement may come up something like:

«TableStart:Vendors»
«VTitle» «VForename» «VSurname»
«VAddress»
«VEmail»
«TableEnd:Vendors»
where Address and Email are required on separate lines.

How to approach in that case to avoid extra line breaks.

Thank you!

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. Just insert TableStat in the paragraph which should be the first and TableEnd in the paragraph, which should be the last one as shown below:

«TableStart:Vendors»«VTitle» «VForename» «VSurname»

«VAddress»

«VEmail»«TableEnd:Vendors»

Best regards.