PP2002: Setting transparencies of two color gradients in VBA?

M

MaSch

Hello all!

I'm using PowerPoint 2002 and want to create a rectangle with a two color
gradient fill in VBA. The problem now is, that the gradient should have
different transparencies associated with the two colors.
My code is the following:

....
With mydocument.Shapes.AddShape(Type:=msoShapeRectangle, _
Top:=FBTop, Left:=FBLeft, Width:=FBWidth,
Height:=FBHeight)
.Name = "SomeName"
.Fill.ForeColor.RGB = FBForeColor
.Fill.BackColor.RGB = FBBackColor
.Fill.TwoColorGradient Style:=msoGradientHorizontal, Variant:=4
.Fill.Transparency = 0.5
.Line.DashStyle = msoLineSolid
.Line.Visible = msoFalse
....

But this code just changes the transparency of the foreground color to 50%.

Does anybody know, how to change the transparency of the second (the
background color) of the gradient?

I couldn't find a property for that... :-(
 
B

Bill Dilworth

I believe that the foreground color transparency setting was not revealed in
the VBA model. It is there somewhere in the PPT coding (it must be), just
not accessible to VBA manipulation.


Bil Dilworth
 
B

Bill Dilworth

Create the shape manually and hide it. Then use the code to copy it and
adjust what is adjustable before making it visible.

Bill Dilworth
 

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