Save as GIF with transparent background in Visio?

V

Vincent Verheul

Hi Group,

I want to save a Visio document as a GIF image with a * transparent *
background. I use this GIF in HTML and want to see the background as it is
defined in the style sheet.

In PowerPoint the following code sets the white background color as the
transparent color and saves the slide as a GIF image:

With Pres.Slides(1) ' Pres is the Presentation object
.FollowMasterBackground = False
.Background.Fill.BackColor.RGB = RGB(255, 255, 255)
.Background.Fill.Transparency = 1
.Export "MyDrawing.gif", ppSaveAsGIF
End With

Note: This works fine with PowerPoint 2003, unfortunately not anymore with
PowerPoint 2007.

I'm looking for a similar solution in Visio. I can see that there is an
Export function (a method of a Visio Page). However, there is no possibility
to set the transparent background color programatically. It is possible via
the user interface for the GIF filter, but not available in VBA?

Thanks,
Vincent
 
V

Vincent Verheul

Hi Group,

I want to save a Visio document as a GIF image with a * transparent *
background. I use this GIF in HTML and want to see the background as it is
defined in the style sheet.

In PowerPoint the following code sets the white background color as the
transparent color and saves the slide as a GIF image:

With Pres.Slides(1) ' Pres is the Presentation object
.FollowMasterBackground = False
.Background.Fill.BackColor.RGB = RGB(255, 255, 255)
.Background.Fill.Transparency = 1
.Export "MyDrawing.gif", ppSaveAsGIF
End With

Note: This works fine with PowerPoint 2003, unfortunately not anymore with
PowerPoint 2007.

I'm looking for a similar solution in Visio. I can see that there is an
Export function (a method of a Visio Page). However, there is no possibility
to set the transparent background color programatically. It is possible via
the user interface for the GIF filter, but not available in VBA?

Or is there a way to call the Visio => GIF 'filter' directly?

Thanks,
Vincent
 
J

JuneTheSecond

Hi,

If you once save the Visio shape as gif, the manual settings made on the
dialog seems to be kept when exporting again as gif.
I think Visio has not such a property to make a color transparent.
You can set a color transparent on the dialog for saving as gif.
Export method is too simple.

--
Best Regards.

JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
 
V

Vincent Verheul

Hi June,

Yes I know that the manual setting is kept as long as you do not close
Visio. It will have to be done manually. It would be nice if the 'save as
GIF' function could be called directly somehow via a Windows call. I have
created logic in VBA in an Access Database which uses Visio to generate
flowcharts. I will try to automate with SendKeys (when the user interface is
in English).

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