Compartilhar via


Style.Type Property

Word Developer Reference

Returns the style type. Read-only WdStyleType.

Syntax

expression.Type

expression   Required. A variable that represents a Style object.

Example

This example displays a message that indicates the style type of the style named "SubTitle" in the active document.

Visual Basic for Applications
  If ActiveDocument.Styles("SubTitle").Type = _
        wdStyleTypeParagraph Then
    MsgBox "Paragraph style"
ElseIf ActiveDocument.Styles("SubTitle").Type = _
        wdStyleTypeCharacter Then
    MsgBox "Character style"
End If

See Also