Here’s the scenario that causes the issue:
Two merge fields with identical settings get same multiline plain input text.
Sample input text:
Text that’s passed to api is "Test\nTest\nTest"
In the merge output doc one field displays text correctly identical to input. The other field changes font of the text starting the second line. Like so:
See attached images for the actual template, input and output.
If I go into word template and add a character after the problematic mergefield or hit enter and then backspace(effectively changing nothing), the issue goes away.
We have many merge documents with many merge fields in each. Going through each one and typing enter+backspace next to each field is highly undesirable. Would be nice to know source of the problem and possible programmatic work around.
Outlined api use:Thank you.
using( MemoryStream templateStream = new MemoryStream( templateFile ) )
doc = new Document( templateStream );
doc.MailMerge.Execute( documentLevelData.Rows[ 0 ] );