View Single Post
 
Old 11-19-2015, 02:50 PM
newbieX newbieX is offline Windows 7 64bit Office 2007
Novice
 
Join Date: Mar 2014
Posts: 6
newbieX is on a distinguished road
Default Bookmark not replaced when inserting but to lower right corner of image

I wrote some VBA code that is not replacing my signature bookmark when I insert it into it.

The bookmark is a single word in the last row of a one column table. When I insert the signature image it appears alongside the bookmark rather than replace it (i.e. the bookmark is not deleted.) Below is my code. Ideas as to where I went wrong?

Thanks in advance.

Code:
If ActiveDocument.Bookmarks.Exists("Sig1") = True Then
    ActiveDocument.Bookmarks("Sig1").Range.InlineShapes.AddPicture FileName:="C\Sig1.png"
Else
    ActiveDocument.Bookmarks("Sig2").Range.InlineShapes.AddPicture FileName:="C\Sig2.png"
End If
Thus it might look like this if bookmark = Sig1

Image here Sig1

Instead of

Image here

Reply With Quote