constant indicating the gradient color type for the specified fill. Read-only.
MsoGradientColorType can be one of these MsoGradientColorType constants. |
msoGradientColorMixed Return value only; indicates a combination of the other states in the specified range. |
msoGradientOneColor |
msoGradientPresetColors |
msoGradientTwoColors |
expression.GradientColorType
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
Use the OneColorGradient, PresetGradient, or TwoColorGradient method to set the gradient type for the fill.
Example
This example changes the fill for all shapes on the first page of the active publication that have a two-color gradient fill to a preset gradient fill.
Dim shpLoop As Shape
' Loop through collection of shapes.
For Each shpLoop In ActiveDocument.Pages(1).Shapes
With shpLoop.Fill
' Test for two-color gradient.
If .GradientColorType = msoGradientTwoColors Then
' Apply a preset gradient.
.PresetGradient Style:=msoGradientHorizontal, _
Variant:=1, PresetGradientType:=msoGradientBrass
End If
End With
Next shpLoop