LineFormat.ForeColor Property

Word Developer Reference

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

Syntax

expression.ForeColor

expression   A variable that represents a LineFormat object.

Example

This example adds a patterned line to the active document.

Visual Basic for Applications
  Dim docActive As Document

Set docActive = ActiveDocument

Visual Basic for Applications
  With docActive.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