I am using openxml WordProcessingDocument to open a Word template and replace placeholder x1 with a string. This works fine unless I need the string to contain a newline.
How can I replace x1 with text may contain newlines that word would recognise? I have tried \n \r but these do not work
Just to explain further when the word template is opened I read it into a StreamReader then use .Replace to replace x1.
To insert newlines, you have to add a
Breakinstance to theRun.Example:
The XML produced will be something like: