TwoColorGradient Method Example
This example adds a rectangle with a two-color gradient fill to myDocument
, and sets the background and foreground color for the fill.
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes _
.AddShape(msoShapeRectangle, 0, 0, 40, 80).Fill
.ForeColor.RGB = RGB(128, 0, 0)
.BackColor.RGB = RGB(0, 170, 170)
.TwoColorGradient msoGradientHorizontal, 1
End With