title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
AutoTextEntries.Add method (Word) |
vbawd10.chm154599525 |
|
|
7ffa87f9-a23c-1847-3907-84c95f2b7f73 |
06/08/2017 |
medium |
Returns an AutoTextEntry object that represents an AutoText entry added to the list of available AutoText entries.
expression.Add (Name, Range)
expression Required. A variable that represents an 'AutoTextEntries' collection.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | String | The text that, when typed, initiates an AutoText entry. |
Range | Required | Range | A range of text that will be inserted whenever Name is typed. |
This example adds an AutoText entry named Sample Text that contains the text in the selection. This example assumes you have text selected in the active document.
Sub AutoTxt()
NormalTemplate.AutoTextEntries.Add Name:="Sample Text", _
Range:=Selection.Range
End Sub
AutoTextEntries Collection Object
[!includeSupport and feedback]