Share via


ShapeRange.Fill Property

Returns a ChartFillFormat object that contains fill formatting properties for the specified shape. Read-only.

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

Syntax

'Declaration
ReadOnly Property Fill As FillFormat
    Get
'Usage
Dim instance As ShapeRange
Dim value As FillFormat

value = instance.Fill
FillFormat Fill { get; }

Property Value

Type: Microsoft.Office.Interop.PowerPoint.FillFormat
FillFormat

Examples

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill.ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

See Also

Reference

ShapeRange Interface

ShapeRange Members

Microsoft.Office.Interop.PowerPoint Namespace