(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
 
Top