How do I insert line in document with Range object

S

Sukhi

Hi
I have have range object, need to insert line after some text

rBMRange.text="xyz" & vbcrlf
rBMRange.text="a Line __________" & vbcrlf
rBMRange.text="some more text" & vbcrlf

help please!!
 
H

Helmut Weber

Hi Sukhi,

hmm... not quite clear what you mean.
I a way, you can't insert a line at all,
only a linebreak, which may or may not result
in a further line, depending on how much text
will be shifted to the line after the linebreak.
With inserting two linebreaks,
you'll always get at least on line more.

Or are just just searching for vbLf.

Have a look into the help as well,
as there is vbNewLine also.
 
S

Sukhi

Thanks Helmut
Had to cheat

rBMRange..Borders(wdBorderTop).LineStyle = wdLineStyleSingle

and set the others to wdLineStyleNone, did the trick

did you get my email the other day, thanking you for all the great work you
do??
keep it up
Sukhi
 
H

Helmut Weber

No.
did you get my email the other day,i

use "red.sys" & chr(64) & "t-online.de"
and put MVP in the subject, otherwise ...

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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