StyleName Property

Microsoft Word Visual Basic

StyleName Property

       

Returns the name of the style applied to the specified AutoText entry. Read-only String.

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