Underline Property

Applies To

Font object, Range object.

Description

Returns or sets the type of underline applied to the font or range. Can be one of the following WdUnderline constants: wdUnderlineNone, wdUnderlineDash, wdUnderlineDotDash, wdUnderlineDotDotDash, wdUnderlineThick, wdUnderlineDotted, wdUnderlineDouble, wdUnderlineSingle, wdUnderlineWords, or wdUnderlineWavy. Read/write Long.

See Also

Bold property, Font property, FormattedText property, Italic property, Size property.

Example

This example applies a double underline to the fourth word in the active document.

ActiveDocument.Words(4).Underline = wdUnderlineDouble
This example applies a single underline to the selected text.

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