Repost: Setting background transparent in VB and save as GIF (PPT 2007)

V

Vincent Verheul

Hello Group,

In PowerPoint 2003 I successfully use Visual Basic code to save a Powerpoint
Slide into GIF format with a transparent background. This does not seem to
work anymore in PowerPoint 2007. Note: I have selected the option "Save as
PowerPoint 97-2003".

This is the VBA code:

Sub TestTransparency(PPT As PowerPoint.Application, _
Pres As PowerPoint.Presentation)
Const FileName = "TestTransparency.ppt"
' skipped some code to set the PPT and Pres objects
PPT.Visible = True
With Pres.Slides(1)
.FollowMasterBackground = False
.Background.Fill.BackColor.RGB = RGB(255, 255, 255)
.Background.Fill.Transparency = 1
End With
Call Pres.SaveAs(FileName, ppSaveAsGIF)
' PowerPoint saves the GIF in a separate folder
End Sub

In fact I am running this out of an MsAccess application using the
PowerPoint library, but that should not make a difference.

Also when doing this manually via the PowerPoint user interface the saved
GIF file has no transparent background: In a slide use the right mouse
button and select Format Background ... then select Solid Fill, Hide
Background Graphics, (optionally select a color, I use white: RGB
255,255,255) and set Transparency to 100%. Then Save As... Other Formats...
GIF.

Anyone ideas? Thanks!
Vincent
 

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