Share via


Font.Underline Property

PowerPoint Developer Reference

Determines whether the specified text (for the Font object) or the font style (for the FontInfo object) is underlined. Read/write.

Syntax

expression.Underline

expression   A variable that represents an Font object.

Return Value
MsoTriState

Remarks

The value of the Underline property can be one of these MsoTriState constants.

Constant Description
msoFalse The specified text (or font style) isn't underlined.
msoTriStateMixed Some characters are underlined (for the specified text) and some aren't.
msoTrue The specified text (or font style) is underlined.

Example

This example sets the formatting for the text in shape two on slide one in the active presentation.

Visual Basic for Applications
  With Application.ActivePresentation.Slides(1).Shapes(2)
    With .TextFrame.TextRange.Font
        .Size = 32
        .Name = "Palatino"
        .Underline = msoTrue
    End With
End With

See Also