Share via


ChartFillFormat.GradientColorType Property

Returns the gradient color type for the specified fill. Read-only.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property GradientColorType As MsoGradientColorType
    Get
'Usage
Dim instance As ChartFillFormat
Dim value As MsoGradientColorType

value = instance.GradientColorType
MsoGradientColorType GradientColorType { get; }

Property Value

Type: Microsoft.Office.Core.MsoGradientColorType
MsoGradientColorType

Remarks

Use the OneColorGradient(MsoGradientStyle, Int32, Single), PresetGradient(MsoGradientStyle, Int32, MsoPresetGradientType), or TwoColorGradient(MsoGradientStyle, Int32) method to set the gradient type for the fill.

The value returned by the GradientColorType property can be one of these MsoGradientColorType constants.

msoGradientColorMixed

msoGradientOneColor

msoGradientPresetColors

msoGradientTwoColors

Examples

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

See Also

Reference

ChartFillFormat Interface

ChartFillFormat Members

Microsoft.Office.Interop.PowerPoint Namespace