This documentation is archived and is not being maintained.

GradientStyle Property

Office 2003

MsoGradientStyle can be one of these MsoGradientStyle constants.
msoGradientDiagonalDown
msoGradientDiagonalUp
msoGradientFromCenter
msoGradientFromCorner
msoGradientFromTitle
msoGradientHorizontal
msoGradientMixed
msoGradientVertical

expression.GradientStyle

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example adds a rectangle to myDocument and sets its fill gradient style to match that of the shape named "rect1." For the example to work, rect1 must have a gradient fill.

Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes
    gradStyle1 = .Item("rect1").Fill.GradientStyle
    With .AddShape(msoShapeRectangle, 0, 0, 40, 80).Fill
        .ForeColor.RGB = RGB(128, 0, 0)
        .OneColorGradient gradStyle1, 1, 1
    End With
End With
		


Applies to | FillFormat Object


Show: