Question posted 2012 · +7 upvotes
I have MS word doc saved as .docx. I want to insert new line in my text by edditing XML file of docx. I have already tried 
, , , 	, amd it always gives me only space not a new line.
what it does:
(XML code)
<w:t>hel
lo</w:t>
When I open .docx file then it is changed to:
Hel lo not as I wanted to be Hel on one line and lo on secound line.
Accepted answer +19 upvotes
Use the <w:br/> tag.
I found it by creating a Word document, saving it as XML (via Save As), adding a forced line break with Shift Enter, and checked out the change. The essential difference seems to be just the w:br tag, apparently reflecting the HTML br tag.
Top ms-word Q&A (6)
- How to open and manipulate Word document/template in Java? +18 (2012)
- Why does the file utility identify Microsoft Word files as CDF? What is this CDF? +15 (2011)
- Version Control for word documents +13 (2008)
- programatically convert word docx to doc without using ole automation +13 (2008)
- What makes Microsoft-Word-generated HTML documents so large in code? +12 (2015)
- SaveAs vs SaveAs2 in the Microsoft Office Word object model +11 (2010)
ms-word solutions on this site
— top 3%.