FillFormat.GradientStops property (Word)
Returns the GradientStops collection associated with the specified fill format. Read-only.
Syntax
expression.GradientStops
expression An expression that returns a FillFormat object.
Remarks
Gradients are a smooth transition from one color state to another. The endpoints of these sections are called stops. Use the GradientStops.Insert method to add gradient stops to the GradientStops collection for the specified object.
Example
The following code example shows how to add a gradient stop at the 50% position to the GradientStops collection of the fill format of the first shape in the active document. For this code example to work, the shape must already have a gradient fill applied.
Public Sub GradientStops_Example()
Dim wdShape As Shape
Dim wdFillFormat As FillFormat
Dim wdGradientStops As GradientStops
Set wdShape = ActiveDocument.Shapes(1)
Set wdFillFormat = wdShape.Fill
Set wdGradientStops = wdFillFormat.GradientStops
wdGradientStops.Insert RGB(255, 0, 255), 0.5
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.