PresetGradientType Property

Microsoft Word Visual Basic

Show All

PresetGradientType Property

       

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

MsoPresetGradientType can be one of these MsoPresetGradientType constants.
msoGradientBrass
msoGradientCalmWater
msoGradientChrome
msoGradientChromeII
msoGradientDaybreak
msoGradientDesert
msoGradientEarlySunset
msoGradientFire
msoGradientFog
msoGradientGold
msoGradientGoldII
msoGradientHorizon
msoGradientLateSunset
msoGradientMahogany
msoGradientMoss
msoGradientNightfall
msoGradientOcean
msoGradientParchment
msoGradientPeacock
msoGradientRainbow
msoGradientRainbowII
msoGradientSapphire
msoGradientSilver
msoGradientWheat
msoPresetGradientMixed

expression.PresetGradientType

expression   Required. An expression that returns 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.

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