Share via


Fill Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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

expression.Fill

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

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

  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