Skip to main content

MS word 2007 won't recognize line breaks ( like "\n")

1 reply [Last post]
Joined: 2009-02-09

If anyone can help me I would apprecciate it.
My program uses velocityContext to create a MS Word doc and then passes a string variable containing text from a text box to the Word instance using method put().
When the Word document loads on screen, it does not see the line or paragraph breaks (\n\r).
For example:
The following text (originaly typed like that in a web page's text box):
2.bbbbbbb displayed on the Word as:
1.aaaaaa 2.bbbbbbb

Can anyone help? thanks a lot, Sioma

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-11-01

In MS DOS, the return sequence is \r\n so I suggest you try that.