T
T Lavedas
I'm building an application that extracts information from an existing
presentation. I want all the text and the image off of the first
slide. I have the text part down, but am frustrated in trying to get
a copy of the image.
The "Export Shapes as graphics" item at PPTFAQ.com suggested the use
of this code:
Call ActiveWindow.Selection.ShapeRange(1).Export( _
"C:\Workarea\filename.gif", _
ppShapeFormatGIF)
But, in my copy of PPT 2003/SP3, the Export method is not supported
for a ShapeRange. The help indicates it is only available for a
Presentation or SlideRange collection, which does not suit my
purposes.
Recording a macro of the use of the Right-click context menu "Save as
Picture ..." process presents this sequence, while correctly saving
the selected picture off of a slide:
ActiveWindow.Selection.SlideRange.Shapes("Picture 6").Select
ActivePresentation.SaveAs FileName:="C:\Picture1.jpg", _
FileFormat:=ppSaveAsJPG, EmbedTrueTypeFonts:=msoFalse
However, when executed as a macro, it saves the whole presentation as
a set of slide images in jpg format in a folder not a file. This is
not acceptable or useable, because the images include the text over
the image.
Has anyone figured out how to *automate* the extraction of a single
image from a slide? I sure hope I don't have to resort to a Sendkeys
solution!
Thanks,
Tom Lavedas
***********
presentation. I want all the text and the image off of the first
slide. I have the text part down, but am frustrated in trying to get
a copy of the image.
The "Export Shapes as graphics" item at PPTFAQ.com suggested the use
of this code:
Call ActiveWindow.Selection.ShapeRange(1).Export( _
"C:\Workarea\filename.gif", _
ppShapeFormatGIF)
But, in my copy of PPT 2003/SP3, the Export method is not supported
for a ShapeRange. The help indicates it is only available for a
Presentation or SlideRange collection, which does not suit my
purposes.
Recording a macro of the use of the Right-click context menu "Save as
Picture ..." process presents this sequence, while correctly saving
the selected picture off of a slide:
ActiveWindow.Selection.SlideRange.Shapes("Picture 6").Select
ActivePresentation.SaveAs FileName:="C:\Picture1.jpg", _
FileFormat:=ppSaveAsJPG, EmbedTrueTypeFonts:=msoFalse
However, when executed as a macro, it saves the whole presentation as
a set of slide images in jpg format in a folder not a file. This is
not acceptable or useable, because the images include the text over
the image.
Has anyone figured out how to *automate* the extraction of a single
image from a slide? I sure hope I don't have to resort to a Sendkeys
solution!
Thanks,
Tom Lavedas
***********