ChangePicture shape dynamically and Keep its Format/Properties

G

Guest

Hi,
I need to do a Replacing (changing) of a picture in a slide at a PowerPoint
presentation.

My problem is that i just need to change the picture an maintain all the
format and previous properties like, transparency, shadow, position etc...
If apply format to a picture, right click it at the end and select the
"Change Picture" context menu item, it will do exactly what i need: replace
the image and preserve the previous shape format and settings.

Of course i could do a new shape and try to copy all the properties from one
shape to another.

But is it possible to do it in a smarter way? like just replacing the image
bitmap or buffer of the shape?

Any help would be apreciated.
Thanks in advance
 
E

Echo S

Rui Barbosa said:
Hi,
I need to do a Replacing (changing) of a picture in a slide at a
PowerPoint
presentation.

My problem is that i just need to change the picture an maintain all the
format and previous properties like, transparency, shadow, position etc...
If apply format to a picture, right click it at the end and select the
"Change Picture" context menu item, it will do exactly what i need:
replace
the image and preserve the previous shape format and settings.

Of course i could do a new shape and try to copy all the properties from
one
shape to another.

But is it possible to do it in a smarter way? like just replacing the
image
bitmap or buffer of the shape?


I guess I don't quite understand what you're after. If this works, why do
you need a different method? I don't know that anything else is going to be
much faster than right-clicking and choosing a different image. This
replaces the image bitmap, which is what you're asking how to do.

I suppose you could save and close the file, rename it to .zip, open the
Zipped file and poke around until you find the original picture and what
folder it's in. Then you could paste in the replacement picture, delete the
original, and rename the replacement the same as the original photo. Sure
doesn't seem like a "smarter" way to do it, though.
 
G

Guest

You're right i missed an extra explanation...
I need to do it in code....
via automation, vbs etc...
 
D

David M. Marcovitz

Now the question makes sense. If you are doing this in Normal view, you
can do something like:

ActiveWindow.Selection.ShapeRange.AutoShapeType = msoShapeLeftArrow

This will change the selected shape to a left arrow shape (just change
what's after the equal sign to the shape you have in mind).

Alternatively, you cuold so something like:

ActivePresentation.Slides(3).Shapes(7).AutoShapeType = msoShapeLeftArrow

This will change the 7th shape on the 3rd slide to the left arrow shape.
You can change the numbers to affect a different shape.

Is this what you had in mind?

--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/

You're right i missed an extra explanation...
I need to do it in code....
via automation, vbs etc...

--------------------------
Rui Barbosa
Devscope.net


Echo S said:
Rui Barbosa said:
Hi,
I need to do a Replacing (changing) of a picture in a slide at a
PowerPoint
presentation.

My problem is that i just need to change the picture an maintain
all the format and previous properties like, transparency, shadow,
position etc... If apply format to a picture, right click it at the
end and select the "Change Picture" context menu item, it will do
exactly what i need: replace
the image and preserve the previous shape format and settings.

Of course i could do a new shape and try to copy all the properties
from one
shape to another.

But is it possible to do it in a smarter way? like just replacing
the image
bitmap or buffer of the shape?


I guess I don't quite understand what you're after. If this works,
why do you need a different method? I don't know that anything else
is going to be much faster than right-clicking and choosing a
different image. This replaces the image bitmap, which is what you're
asking how to do.

I suppose you could save and close the file, rename it to .zip, open
the Zipped file and poke around until you find the original picture
and what folder it's in. Then you could paste in the replacement
picture, delete the original, and rename the replacement the same as
the original photo. Sure doesn't seem like a "smarter" way to do it,
though.

--
Echo [MS PPT MVP] http://www.echosvoice.com
What's new in PPT 2007? http://www.echosvoice.com/2007.htm
Fixing PowerPoint Annoyances
http://www.oreilly.com/catalog/powerpointannoy/
 
S

Steve Rindsberg

David M. said:
Now the question makes sense. If you are doing this in Normal view, you
can do something like:

ActiveWindow.Selection.ShapeRange.AutoShapeType = msoShapeLeftArrow

To change a shape, yes, but I think Rui needs to change from one image to
another.

Hm. Rui, in addition to my other reply, if you have control over the original,
you could use a shape fill to add the picture rather than inserting an image.
Then you could simply choose a different image as fill for the shape.
 
G

Guest

Thank you all for your help.
It helped a lot.
Best regards,

Rui Barbosa
Devscope.net

-- --------------------------
 
D

David M. Marcovitz

Oops. I guess I misread the question. Glad you caught it and gave a
correct solution.
--David
 

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