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
 
Top