View Full Version : Line break (newline) in MS-Word

05-20-2011, 05:13 PM

I am using phpWord (http://phpword.codeplex.com/) to generate word documents, the only problem is I dont know how to add a line break, does anyone know what is the character for line break, so for example I have the following text:

This is
Test Text

Now if I enter that into the word document, this is what I get in the word document:

This is a Test Text

I really am after a character that I can use that will generate a new line, please note I have tried all of the following characters and they don't work


Would really appreciate if some one could help.


05-21-2011, 12:12 AM
according to the manual "Calling the addText() function will always create a line break. This happens because the DOCX Writer creates a paragraph for each text element."

05-21-2011, 06:08 PM
Yes I know that but the problem is I am using a template. and I must use the setText method. Thanks