Share via


TextStyle Property.TextStyle Property

Publisher Developer Reference

Returns or sets a Variant that represents the text style applied to a paragraph. Read/write.

Syntax

expression.TextStyle

expression   A variable that represents a TextStyle Property object.

Return Value
Variant

Example

This example changes the text style of the selection if the selection isn't formatted with the Normal text style. This example assumes text is selected in the active publication.

Visual Basic for Applications
  Sub SetTextStyle()
    With Selection.TextRange.ParagraphFormat
        If .TextStyle <> "Normal" Then _
            .TextStyle = "Normal"
    End With
End Sub

See Also