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.
To insert newlines, you have to add a Break instance to the Run.
Break
Run
Example:
run.AppendChild(new Text("Hello")); run.AppendChild(new Break()); run.AppendChild(new Text("world"));
The XML produced will be something like:
Hello world