FillFormat.GradientStops property (PowerPoint)

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

Syntax

expression.GradientStops

expression An expression that returns a FillFormat object.

Return value

GradientStops

Remarks

Use the GradientStops.Insert method to add gradient stops to the GradientStops collection for the specified object.

Example

The following example shows how to add a gradient stop at the 50% position to the GradientStops collection of the fill format of the first shape on the first slide of the active presentation. For this example to work, the shape must already have a gradient fill applied.

Public Sub GradientStops_Example() 
 
    Dim pptShape As Shape 
    Dim pptFillFormat As FillFormat 
    Dim pptGradientStops As GradientStops 
     
    Set pptShape = ActivePresentation.Slides(1).Shapes(1) 
    Set pptFillFormat = pptShape.Fill 
    Set pptGradientStops = pptFillFormat.GradientStops 
     
    pptGradientStops.Insert RGB(255, 0, 255), 0.5 
     
End Sub

See also

FillFormat Object

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.