FillFormat.GradientStops Property (Word)
This documentation is archived and is not being maintained.

FillFormat.GradientStops Property (Word)

Returns the GradientStops collection associated with the specified fill format. Read-only.

Version Added: Word 2010

expression .GradientStops

expression An expression that returns a FillFormat object.

Gradients are a smooth transition from one color state to another. The endpoints of these sections are called stops. You can use the GradientStops.Insert method to add gradient stops to the GradientStops collection for the specified object.

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
© 2016 Microsoft