Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I add picture from folder into placeholder with VBA PPT_07?

487 views
Skip to first unread message

MM

unread,
Aug 19, 2008, 11:22:42 AM8/19/08
to
I'm trying to write a macro to insert an image that into a placeholder that
already exists on my layout. I know how to do this with text:
With MySlide.Shapes
.PlaceHolders(1).TextFrame.TextRange = "This is my text"
The above snippet puts "This is my text" into Placeholder #2. I'm stuck so
far on how do do this with pictures. Any help would be much appreciated
By the way -I've seen the terrific Sub ImportABunch() on pptfaq.com. But
that approach uses the AddPicture method and ignores existing placeholders
.. or am I missing something? Also, thanks to Lucy and other for
responding to my previous questions


Steve Rindsberg

unread,
Aug 19, 2008, 8:09:03 PM8/19/08
to
In article <g8eohe$lj$1...@solaris.cc.vt.edu>, Mm wrote:
> I'm trying to write a macro to insert an image that into a placeholder that
> already exists on my layout. I know how to do this with text:
> With MySlide.Shapes
> .PlaceHolders(1).TextFrame.TextRange = "This is my text"
> The above snippet puts "This is my text" into Placeholder #2. I'm stuck so
> far on how do do this with pictures. Any help would be much appreciated
> By the way -I've seen the terrific Sub ImportABunch() on pptfaq.com. But
> that approach uses the AddPicture method and ignores existing placeholders
> ... or am I missing something? Also, thanks to Lucy and other for
> responding to my previous questions

You could always insert the image as a shape then pick up the placeholder's
position/size and resize/position the picture to fit, then delete the
placeholder.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com

0 new messages