nl5n
02-28-2008, 10:28 AM
Hi,
I wrote a macro that exports shapes one by one from a powerpoint presentation as PNG (or GIF) files.
My problem is that the transparency is never exported.
Powerpoint exports a white background instead of transparent areas.
I use the following code:
ActiveWindow.Selection.SlideRange.Shapes(1).Select
ActivePresentation.Export path & "\icoppt\" & filename & "." & graphic_type, graphic_type, scalewidth, scaleheight
I also tried by hand to export shapes with the right-click menu : "save as picture". It worked, the transparency was exported.
I then recorded a macro doing this, but when I play the macro, it exports the entire slide with no transparency and not the shapes alone!!!
code of the recorded macro:
ActiveWindow.Selection.SlideRange.Shapes("AutoShape 4").Select
ActivePresentation.SaveAs FileName:="Image3.png", FileFormat:=ppSaveAsPNG, EmbedTrueTypeFonts:=msoFalse
My question is then: How can I get transparency exported (as alpha channel in PNG would be ideal).
Thanks in advance for your answers.
I wrote a macro that exports shapes one by one from a powerpoint presentation as PNG (or GIF) files.
My problem is that the transparency is never exported.
Powerpoint exports a white background instead of transparent areas.
I use the following code:
ActiveWindow.Selection.SlideRange.Shapes(1).Select
ActivePresentation.Export path & "\icoppt\" & filename & "." & graphic_type, graphic_type, scalewidth, scaleheight
I also tried by hand to export shapes with the right-click menu : "save as picture". It worked, the transparency was exported.
I then recorded a macro doing this, but when I play the macro, it exports the entire slide with no transparency and not the shapes alone!!!
code of the recorded macro:
ActiveWindow.Selection.SlideRange.Shapes("AutoShape 4").Select
ActivePresentation.SaveAs FileName:="Image3.png", FileFormat:=ppSaveAsPNG, EmbedTrueTypeFonts:=msoFalse
My question is then: How can I get transparency exported (as alpha channel in PNG would be ideal).
Thanks in advance for your answers.