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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting External Document In Word FormFields(Bookmarks)

Status
Not open for further replies.

Delano29

Technical User
Jul 10, 2001
28
US
Hi,

I need to insert tne contents of an external document in a MS Word97 formfield(bookmark) using a command button. I am trying to insert the document within the field without deleting the formfield(bookmark). All the codes that I have tried so far including the following has only deleted the bookmark and replaced it with the text from the external document.

ActiveDocument.FormFields("Text44").Range.InsertFile Filename:="c:\my documents\3.doc"

Thanks.
 

I tried this and it worked great.

ActiveDocument.FormFields("text44").TextInput.Clear
Selection.GoTo what:=wdGoToBookmark, Name:="text44"
Selection.Collapse direction:=wdCollapseStart
Selection.MoveRight wdCharacter, 1
Selection.InsertFile FileName:="c:\my documents\Search and Arrest.doc", link:=True, attachment:=False
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top