Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / February 2007

Tip: Looking for answers? Try searching our database.

extracting images from placeholder objs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
melanie - 08 Feb 2007 23:09 GMT
Hi,

I'm using the C# API to extract images and text from PowerPoint slides. I
have no problems extracting text and pictures when they are the msoPicture
type. However, when pictures are within the Placeholder I don't know how to
determine that the ppPlaceholderObject contains a picture, and assuming that
it does and attempting to export it doesn't work. I'm pretty new to the
PowerPoint Object Model and its API so any help is appreciated.

Thanks!
Steve Rindsberg - 09 Feb 2007 04:58 GMT
> Hi,
>
[quoted text clipped - 4 lines]
> it does and attempting to export it doesn't work. I'm pretty new to the
> PowerPoint Object Model and its API so any help is appreciated.

Copy the picture, check the type of the copied shape.  
If it's a picture, you know what to do with it.
If not, delete it.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
melanie - 12 Feb 2007 19:07 GMT
Thanks for your response, Steve.

I'm not sure that I follow how to just "copy the picture". Wouldn't copying
the shape just make a copy of a placeholderformat shape of type
ppPlaceholderObject?

How do you copy the picture if you don't even know it's a picture? The
ppPlaceholderObject could also be a diagram, chart, table, media clip, etc.

Moreover, I don't know how to access the shape within the placeholder shape.
I'd appreciate any clarification to this.

Thanks!
Melanie

> > Hi,
> >
[quoted text clipped - 14 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 12 Feb 2007 22:55 GMT
> Thanks for your response, Steve.
>
> I'm not sure that I follow how to just "copy the picture". Wouldn't copying
> the shape just make a copy of a placeholderformat shape of type
> ppPlaceholderObject?

No, because you can't create your own placeholders in PPT, nor can there be more
than one placeholder of a given type on a slide, so when you copy the placeholder,
PPT converts it to a normal shape (of the type contained in the original
placeholder).

> How do you copy the picture if you don't even know it's a picture?The
> ppPlaceholderObject could also be a diagram, chart, table, media clip, etc.

You copy first, then test to see what the .Type of the new shape is.  If it's
something you want to work with, you're off to the races.  If not, you delete it.

Make more sense?

> Moreover, I don't know how to access the shape within the placeholder shape.
> I'd appreciate any clarification to this.

There's no shape within the placeholder shape.  It *IS* a placeholder shape, but
one that happens to contain other content.

> Thanks!
> Melanie
[quoted text clipped - 17 lines]
> > PPTools:  www.pptools.com
> > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
melanie - 13 Feb 2007 01:50 GMT
Thanks a lot, Steve! That helped!

> > Thanks for your response, Steve.
> >
[quoted text clipped - 48 lines]
> PPTools:  www.pptools.com
> ================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.