PP2002: Setting transparencies of two color gradients in VBA?

  • Thread starter Thread starter MaSch
  • Start date Start date
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... :-(
 
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
 
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
 
Back
Top