The AutoTextList field code creates a shortcut menu based on AutoText entries in the active template. The list can vary based on the style that is applied to the AutoText entries when they are created.
Syntax
When you view the AutoTextList field code in your document, the syntax looks like this:
{ AUTOTEXTLIST "Literal text" \s ["Style name"] \t ["Tip text"] }
Note: A field code tells the field what to show. Field results are what is shown in the document after having evaluated the field code. To toggle between viewing the field code and the field code results, press Alt+F9.
Instructions
"Literal text"
Text that displays in the document before the user displays the shortcut menu. If the text contains spaces, enclose it in quotation marks.
"Style name"
The name of the style of the AutoText entries that you want to appear in the list. The style can be a paragraph style or a character style. If the style name contains spaces, enclose it in quotation marks.
"Tip text"
Text that displays in the ScreenTip when the mouse pointer hovers over the field result. Enclose the text in quotation marks.
Switches
\s
Specifies that the list will contain entries based on a specific style. Without this switch, AutoText entries of the current paragraph style appear. If there are no entries for the current style, all AutoText entries appear.
\t
Specifies unique text to show in the ScreenTip instead of the default tip.
Example
If you have created AutoText entries that have the Salutation style applied to them, you can add the following AutoTextList field code:
{ AUTOTEXTLIST "List of salutations" \s Salutation \t "Choose a salutation" } displays the following:
-
In the document: Salutation list
-
In the ScreenTip: Choose a salutation
-
On the shortcut menu: the list of AutoText entries whose style is Salutation.