PresetGradientType Property [Publisher 2003 VBA Language Reference]
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 one of the objects in the Applies To list.
Remarks
Use the PresetGradient method to set the preset gradient type for the fill.
Example
This example changes the fill for the first shape on the first page of the active publication to the Fog preset gradient fill if it is not already set to the Fog preset gradient. This example assumes that there is at least one shape on the first page of the active publication.
Sub SetGradient()
With ActiveDocument.Pages(1).Shapes(1).Fill
If .PresetGradientType <> msoGradientFog Then
.PresetGradient Style:=msoGradientHorizontal, _
Variant:=1, PresetGradientType:=msoGradientFog
End If
End With
End Sub
Applies to | FillFormat Object