Link to home
Start Free TrialLog in
Avatar of dspace
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").Range
        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.
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial