Position cursor inside textbox

K

Kristine

Hello.

I have a textbox that I am inserting a text file into. That works fine, but
I want 2 blank paragraphs above it. I can insert the 2 CHR(13), but when I
run selection.insertfile, it places it at the beginning.

I cannot figure this out. It should be easy but isn't.
 
G

Graham Mayor

Use

Dim oTB As Range
Set oTB = Selection.Range
With oTB
.InsertBefore Chr(13) & Chr(13)
.Collapse wdCollapseEnd
.InsertFile "d:\path\Filename.doc"
End With

or

With Selection
.TypeParagraph
.TypeParagraph
.InsertFile "d:\path\Filename.doc"
End With


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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