Bookmark and replace picture

D

digbydog

Hi,

I am using bookmarks in templates to be able to replace text returned from a
database which is all working fine. Also in the template is a picture and I
was hoping to do a similar thing using bookmarks but have been unable to
work it out.

I was using the bookmark to get the range where the picture is and then add
the new picture using ActiveDocument.Shapes.AddPicture() and then set the
size of the new picture of the current one and then delete the old one.

Issue is that the enclosed bookmark containing the picture doesn't seem to
include the picture itself as when the bookmark is deleted the picture
remains.

Has anyone tried to do something similar? Also there may be more than one
picture in the document so trying to use the shapes collection and
add/remove won't work unless I can somehow assign a name to each picture.

Hope that makes sense and if anyone has any ideas please let me know.

thanks
Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top