shapes object

Z

zidansoft

Is there any way to save each shape object as a different file(bmp or
jpg like that)..
from PowerPoint presentation (through automation) ?
thanks
 
S

Shyam Pillai

Use this:
Const BASE_PATH = "F:\Under development\MSDN\"
Sub ExportShapesAsImages()
Dim oSld As Slide
Dim oShp As Shape
Dim sExportImage As String

For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
sExportImage = BASE_PATH & "Sl_" & oSld.SlideIndex & "_Shp_" & _
oShp.ZOrderPosition & ".jpg"
Call oShp.Export(sExportImage, ppShapeFormatJPG)
Next
Next

End Sub

--
Regards,
Shyam Pillai

Animation Carbon
http://www.animationcarbon.com
 
Z

zidansoft

Thanks for your valuable advice..

Shyam said:
Use this:
Const BASE_PATH = "F:\Under development\MSDN\"
Sub ExportShapesAsImages()
Dim oSld As Slide
Dim oShp As Shape
Dim sExportImage As String

For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
sExportImage = BASE_PATH & "Sl_" & oSld.SlideIndex & "_Shp_" & _
oShp.ZOrderPosition & ".jpg"
Call oShp.Export(sExportImage, ppShapeFormatJPG)
Next
Next

End Sub

--
Regards,
Shyam Pillai

Animation Carbon
http://www.animationcarbon.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