Share via


FillFormat.GradientStops Property (Word)

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

Version Information

Version Added: Word 2010

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. You can 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

Concepts

FillFormat Object Members

FillFormat Object