Adds an event listener.
Object
TextVariable
A text variable definition in a document.
Hierarchy
TextVariable
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| TextVariableInstance[] | readonly | Variable instances associated with the text variable. | |
| EventListeners |
readonly | A collection of event listeners. | |
| Events |
readonly | A collection of events. | |
| Number | readonly | The index of the TextVariable within its containing object. | |
| Boolean | readonly | Returns true if the object specifier resolves to valid objects. | |
| String | read/write | The name of the TextVariable. | |
| Application | Document | readonly | The parent of the TextVariable (a Application or Document). | |
| Preferences |
readonly | A collection of preferences objects. | |
| Object | read/write | A property that allows setting of several properties at the same time. | |
| ChapterNumberVariablePreference | CustomTextVariablePreference | DateVariablePreference | FileNameVariablePreference | MatchCharacterStylePreference | MatchParagraphStylePreference | PageNumberVariablePreference | CaptionMetadataVariablePreference | readonly | The preferences associated with the text variable. Can return: PageNumberVariablePreference, ChapterNumberVariablePreference, DateVariablePreference, FileNameVariablePreference, MatchCharacterStylePreference, MatchParagraphStylePreference, CustomTextVariablePreference or CaptionMetadataVariablePreference. | |
| VariableTypes | read/write | The variable type. |
Methods
→ Text[]
Convert all of this variable's instances to text.
→ TextVariable[]
Resolves the object specifier, creating an array of object references.
→ void
Deletes the TextVariable.
→ Boolean
Removes the event listener.
→ String
Generates a string which, if executed, will return the TextVariable.
→ String
Retrieves the object specifier.
Object of 13
Properties elsewhere that hold a TextVariable.
CaptionMetadataVariablePreference.parentChapterNumberVariablePreference.parentCustomTextVariablePreference.parentDateVariablePreference.parentEvent.parentEventListener.parentFileNameVariablePreference.parentMatchCharacterStylePreference.parentMatchParagraphStylePreference.parentMutationEvent.parentPageNumberVariablePreference.parentPreference.parentTextVariableInstance.associatedTextVariable
Parameter of 3
Method parameters that accept a TextVariable.
Return 13
Methods that return a TextVariable.
TextVariable.getElements()TextVariables.[]()TextVariables.add()TextVariables.anyItem()TextVariables.everyItem()TextVariables.firstItem()TextVariables.item()TextVariables.itemByName()TextVariables.itemByRange()TextVariables.lastItem()TextVariables.middleItem()TextVariables.nextItem()TextVariables.previousItem()