Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSWORD and VB

Status
Not open for further replies.

Ferlin

Programmer
Jan 18, 2001
71
US
Hi All,

I was just wondering what is the best way to append a text file to the end of a Microsoft Word Document using VB6?

If it's using the Word Object (i.e Dim objMsWord As Word.Application etc...) then what's the best way to accomplish this?

I did not see an append method when looking through some of the documentation on the Word Object.

Thanks any help would be appreciated.

Ferlin.
 
Just do:

Set rng = objMSWord.ActiveDocument.Range
rng.Collapse wdCollapseEnd

objMSWord.ActiveDocument.rng.InsertFile FileName:="ftp1.txt", Range:="", ConfirmConversions:= False, Link:=False, Attachment:=False

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top