new line in a word document??

J

Jonathan West

Kenneth said:
Hi,
How can i insert a new line?

line1
line2
line3


Two ways of doing this

1. Use the InsertParagraphAfter method

Selection.InsertAfter "line 1"
Selection.InsertParagraphAfter
Selection.InsertAfter "line 2"
Selection.InsertParagraphAfter
Selection.InsertAfter "line 3"
Selection.InsertParagraphAfter


2. Use vbCr in the string
Selection.InsertAfter "line 1" & vbCr & "line 2" & vbCr & "line 3" & vbCr

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top