Export (0) Print
Expand All

Shape.Fill Property

Office 2007
Returns a FillFormat object representing the fill for the specified shape or table cell.

Syntax

expression.Fill

expression   A variable that represents a Shape object.

Example

This example creates a new AutoShape object and fills the shape with green.

Visual Basic for Applications
Sub NewShapeItem()

    Dim shpHeart As Shape

    Set shpHeart = ThisDocument.MasterPages.Item(1).Shapes _
        .AddShape(Type:=msoShapeHeart, Left:=40, Top:=80, _
        Width:=50, Height:=50)
    shpHeart.Fill.ForeColor.RGB = RGB(Red:=0, Green:=255, Blue:=0)

End Sub

See Also


Community Additions

ADD
Show:
© 2015 Microsoft