Results 1 to 2 of 2
2016-10-18, 08:25 #1
- Join Date
- Oct 2016
- Thanked 0 Times in 0 Posts
Merge field should contain line breaks
I have a mail merge field that contains the addresses for a branch. This field contains line breaks as the address consists of multiple rows.
I have automated the mail merge in a c# webservice.
My datasource is a tab delimited text file. If I use \n and\or \r in the field the opendatasource method gives an exception.
I have also tried, " " as well as "
", but this is just displayed as plain text in the resultant word document.
2016-10-19, 17:59 #2
- Join Date
- May 2002
- Canberra, Australian Capital Territory, Australia
- Thanked 426 Times in 352 Posts
Unless the line breaks are physically present in the data, nothing you can do will cause the mailmerge to add them. With text files, that's impossible, AFAIK. Preferably, you should have separate, tab-delimited, fields for each component of the address. That way, you can have the line breaks (including conditional ones) in the mailmerge main document itself, as discussed in my Word Mailmerge Tips & Tricks 'Sticky' thread at the top of this forum: http://windowssecrets.com/forums/sho...ips-amp-TricksCheers,
[MS MVP - Word]