Multi-line merge fields and line spacing

1

A database field contains several lines. When the field is merged in the Word document, each line becomes a paragraph, therefore each of them get the paragraph spacing.

Example:

«my_merge_field»

is formatted as "space before: 12 pt". The result, after merging is:

Text before

Line 1 of my merge field

Line 2 of my merge field

Line 3

expected:

Text before

Line 1 of my merge field
Line 2 of my merge field
Line 3

I tried ticking "Don't add space between paragraphs of the same style" (on paragraph formatting) but it doesn't help... because the previous paragraph is of the same style.

I can change the line separator of the database field, if there is a code for "soft returns" I can use.

angus

Posted 2015-07-14T13:16:48.397

Reputation: 111

Answers

0

Ok, I just found out the code for "soft return" is NCHAR(11).

So I can use REPLACE(dbfield, NCHAR(13)+NCHAR(10), NCHAR(11)) (in the SELECT clause) to transform "hard returns" to "soft" ones.

Although this solves my problem, I will accept any answer that doesn't require modifying the field's content before it is merged.

angus

Posted 2015-07-14T13:16:48.397

Reputation: 111