InDesign Server2025
API 20.5.0.49

Properties

NameType AccessDescription
TextVariableInstance[] readonly Variable instances associated with the text variable.
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> 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<Preference> 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

EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
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.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
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.

Parameter of 3

Method parameters that accept a TextVariable.

Return 13

Methods that return a TextVariable.