TextVariable

A text variable definition in a document.

Methods:

convertToText, getElements, remove, toSource, toSpecifier

Objects:

Boolean, ChapterNumberVariablePreference, CustomTextVariablePreference, DateVariablePreference, FileNameVariablePreference, MatchCharacterStylePreference, MatchParagraphStylePreference, Number, Object, PageNumberVariablePreference, String, TextVariableInstance, VariableTypes,

Preferences:

ChapterNumberVariablePreference, CustomTextVariablePreference, DateVariablePreference, FileNameVariablePreference, MatchCharacterStylePreference, MatchParagraphStylePreference, PageNumberVariablePreference,

Property Listing

Property

Type

Access

Description

associatedInstances

Array of TextVariableInstance

readonly

Variable instances associated with the text variable.

index

Number

readonly

The index of the TextVariable within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

name

String

read/write

The name of the TextVariable.

parent

Application

Document

readonly

The parent of the TextVariable (a Application or Document).

properties

Object

read/write

A property that allows setting of several properties at the same time.

variableOptions

ChapterNumberVariablePreference

DateVariablePreference

FileNameVariablePreference

MatchCharacterStylePreference

MatchParagraphStylePreference

PageNumberVariablePreference

CustomTextVariablePreference

readonly

The preferences associated with the text variable. Can return: PageNumberVariablePreference, ChapterNumberVariablePreference, DateVariablePreference, FileNameVariablePreference, MatchCharacterStylePreference, MatchParagraphStylePreference or CustomTextVariablePreference.

variableType

VariableTypes

VariableTypes.CHAPTER_NUMBER_TYPE

VariableTypes.CREATION_DATE_TYPE

VariableTypes.CUSTOM_TEXT_TYPE

VariableTypes.FILE_NAME_TYPE

VariableTypes.LAST_PAGE_NUMBER_TYPE

VariableTypes.MATCH_CHARACTER_STYLE_TYPE

VariableTypes.MATCH_PARAGRAPH_STYLE_TYPE

VariableTypes.MODIFICATION_DATE_TYPE

VariableTypes.OUTPUT_DATE_TYPE

VariableTypes.XREF_CHAPTER_NUMBER_TYPE

VariableTypes.XREF_PAGE_NUMBER_TYPE

read/write

The variable type.

Method Listing

Text convertToText ()

Convert all of this variable's instances to text.

TextVariable getElements ()

Resolves the object specifier, creating an array of object references.

undefined remove ()

Deletes the TextVariable.

String toSource ()

Generates a string which, if executed, will return the TextVariable.

String toSpecifier ()

Retrieves the object specifier.

Object of

TextVariableInstance.associatedTextVariable

ChapterNumberVariablePreference.parent

CustomTextVariablePreference.parent

DateVariablePreference.parent

FileNameVariablePreference.parent

MatchCharacterStylePreference.parent

MatchParagraphStylePreference.parent

PageNumberVariablePreference.parent

Return

TextVariables.add()

TextVariable.getElements()

TextVariables.anyItem()

TextVariables.everyItem()

TextVariables.nextItem()

TextVariables.previousItem()

TextVariables.item()

TextVariables.[]()

TextVariables.itemByName()

TextVariables.itemByRange()

TextVariables.firstItem()

TextVariables.lastItem()

TextVariables.middleItem()