Share via


FillFormat.PresetGradientType Property

Word Developer Reference

Returns the preset gradient type for the specified fill. Read-only MsoPresetGradientType.

Syntax

expression.PresetGradientType

expression   An expression that represents a FillFormat object.

Remarks

Use the PresetGradient method to set the preset gradient type for the fill.

Example

This example changes the fill for all shapes in myDocument with the Moss preset gradient fill to the Fog preset gradient fill.

Visual Basic for Applications
  Set myDocument = ActiveDocument
For Each s In myDocument.Shapes
    With s.Fill
        If .PresetGradientType = msoGradientMoss Then
            .PresetGradient msoGradientHorizontal, 1, _
                msoGradientFog
        End If
    End With
Next

See Also