AutoTextEntry Object
Word Developer Reference |
Represents a single AutoText entry. The AutoTextEntry object is a member of the AutoTextEntries collection. The AutoTextEntries collection contains all the AutoText entries in the specified template. The entries are listed on the AutoText tab in the AutoCorrect dialog box.
Remarks
Use AutoTextEntries(index), where index is the AutoText entry name or index number, to return a single AutoTextEntry object. You must exactly match the spelling (but not necessarily the capitalization) of the name, as it is shown on the AutoText tab in the AutoCorrect dialog box. The following example sets the value of an existing AutoText entry named "cName."
Visual Basic for Applications |
---|
|
The following example displays the name and value of the first AutoText entry in the template attached to the active document.
Visual Basic for Applications |
---|
|
The following example inserts the global AutoText entry named "TheWorld" at the insertion point.
Visual Basic for Applications |
---|
|
Use the Add method to add an AutoTextEntry object to the AutoTextEntries collection. The following example adds an AutoText entry named "Blue" based on the text of the selection.
Visual Basic for Applications |
---|
|
See Also