Table of contents
TOC
Collapse the table of content
Expand the table of content

FillFormat.ForeColor Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.

Syntax

expression. ForeColor

expression A variable that represents a FillFormat object.

Return Value

ColorFormat

Example

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

This example adds a patterned line to myDocument.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 100, 250, 0).Line

    .Weight = 6

    .ForeColor.RGB = RGB(0, 0, 255)

    .BackColor.RGB = RGB(128, 0, 0)

    .Pattern = msoPatternDarkDownwardDiagonal

End With

See also

Concepts

FillFormat Object

© 2018 Microsoft