dspace
asked on
Insert File at Bookmark
With Word 2003, I'm using the following code to insert a file at a bookmark:
If PathExists("C:\Taxes\Towns \" & PropCity & ".doc") Then
ChangeFileOpenDirectory "C:\Taxes\Towns\"
Set rngPara = ActiveDocument.Bookmarks(" Town").Ran ge
With rngPara
.Font.Size = 12
.Font.Bold = False
.InsertFile FileName:=PropCity & ".doc", ConfirmConversions:=False, Link:=False, Attachment:=False
End With
End If
This works fine and does what I want EXCEPT it seems to delete the bookmark. If I look at my bookmarks after this code has run, the "Town" bookmark no longer exists. Is there a way to prevent this from happening?
Thanks.
If PathExists("C:\Taxes\Towns
ChangeFileOpenDirectory "C:\Taxes\Towns\"
Set rngPara = ActiveDocument.Bookmarks("
With rngPara
.Font.Size = 12
.Font.Bold = False
.InsertFile FileName:=PropCity & ".doc", ConfirmConversions:=False,
End With
End If
This works fine and does what I want EXCEPT it seems to delete the bookmark. If I look at my bookmarks after this code has run, the "Town" bookmark no longer exists. Is there a way to prevent this from happening?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.