Share via


LineFormat.Pattern Property

Word Developer Reference

Returns or sets a value that represents the pattern applied to the specified line. Read/write MsoPatternType.

Syntax

expression.Pattern

expression   Required. A variable that represents a LineFormat object.

Example

This example adds a patterned line to myDocument.

Visual Basic for Applications
  Set myDocument = ActiveDocument
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