Partager via


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

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

Concepts

FillFormat Object

FillFormat Object Members