Font.Underline Property

Word Developer Reference

Returns or sets the type of underline applied to the font. Read/write WdUnderline.

Syntax

expression.Underline

expression   Required. A variable that represents a Font object.

Example

This example applies a single underline to the selected text.

Visual Basic for Applications
  If Selection.Type = wdSelectionNormal Then
    Selection.Font.Underline = wdUnderlineSingle
Else
    MsgBox "You need to select some text."
End If

See Also