Replacing (changing) the pictures in PowerPoint presentation

H

hanisimo

I am trying to write a small program to replace pictures in PowerPoint
presentation...

To find the pictures, I check Shape Type (Shape.Type = msoPicture)...

But the problem is: how can I change the picture after this step? What
is the method I should use to load the new picture from file to the
Shape?

Best regards and have a nice day,
Hani
 
D

David M. Marcovitz

If the shape is a picture itself, you will have to delete it and insert a
new picture. After identifying the picture, you will want to copy all the
relevant specs of the picture .Left, .Top, .Height, .Width, etc. and add
the new picture with the same specs. This could get to be tricky if the
old and new pictures have different sizes, or if the old picture has
animation that needs to be copies as well. The basic method is
..Shapes.AddPicture

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
H

hanisimo

Thanks a million David,

Yes, the shape itself is a picture... I can imagine that, it will be
very complicated; specially if the old picture is a member in a
group...

Thanks again David and have a great day,
Hani
 
D

David M. Marcovitz

Thanks a million David,

Yes, the shape itself is a picture... I can imagine that, it will be
very complicated; specially if the old picture is a member in a
group...

Thanks again David and have a great day,
Hani

Oy. Groups, too. That adds even more complexity.

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 

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