StyleName Property

Microsoft Word Visual Basic

expression.StyleName

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example creates an AutoText entry and then displays the style name of the entry.

Set myentry = NormalTemplate.AutoTextEntries.Add(Name:="rsvp", _
    Range:=Selection.Range)
MsgBox myentry.StyleName