GradientColorType Property
Applies To
FillFormat object.
Description
Returns the gradient color type for the specified fill. Can be one of the following MsoGradientColorType constants: msoGradientColorMixed, msoGradientOneColor, msoGradientPresetColors, or msoGradientTwoColors. Read-only Long.
This property is read-only. Use the OneColorGradient, PresetGradient, or TwoColorGradient method to set the gradient type for the fill.
Example
This example changes the fill for all shapes in myDocument that have a two-color gradient fill to a preset gradient fill.
Set myDocument = ActivePresentation.Slides(1)
For Each s In myDocument.Shapes
With s.Fill
If .GradientColorType = msoGradientTwoColors Then
.PresetGradient msoGradientHorizontal, 1, _
msoGradientBrass
End If
End With
Next