(Inline)Shape - how do I change the bitmap itself?

C

Colbert Zhou [MSFT]

Hello Dave,

I looked through the object models, but it seems the change picture
function is not exported. I think as an alternative solution, we can remove
the picture first and then add the new wanted picture. I have written some
codes and it works fine for me.

Application.ActiveDocument.InlineShapes(1).Range.Select
Application.ActiveDocument.InlineShapes(1).Delete
Application.Selection.InlineShapes.AddPicture
("C:\Users\Public\Pictures\Sample Pictures\koala.jpg")

Could you please give it a try to see if it works for you. If you have any
future questions on this, just let me know. :)

Best regards,
Colbert Zhou
Microsoft Online Community Support
 
D

David Thielen

Yep, that's what we're doing. We have to copy across all properties
too. We use InsertXML() instead of AddPicture() (thank you for that
suggestion) as we have the picture in memory.

thanks - dave


Hello Dave,

I looked through the object models, but it seems the change picture
function is not exported. I think as an alternative solution, we can remove
the picture first and then add the new wanted picture. I have written some
codes and it works fine for me.

Application.ActiveDocument.InlineShapes(1).Range.Select
Application.ActiveDocument.InlineShapes(1).Delete
Application.Selection.InlineShapes.AddPicture
("C:\Users\Public\Pictures\Sample Pictures\koala.jpg")

Could you please give it a try to see if it works for you. If you have any
future questions on this, just let me know. :)

Best regards,
Colbert Zhou
Microsoft Online Community Support


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

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