TextVariableInstances

A collection of text variable instances.

Methods:

count, add, item, itemByName, itemByID, itemByRange, firstItem, lastItem, middleItem, previousItem, nextItem, anyItem, everyItem, toSource, []

Property Listing

Property

Type

Access

Description

length

Number

readonly

The number of objects in the collection.

Method Listing

TextVariableInstance [] (index:Number)

Returns the TextVariableInstance with the specified index.

Parameter

Type

Description

index

Number

The index.

TextVariableInstance add ([to:LocationOptions=LocationOptions], reference:Varies, withProperties:Object)

Creates a text variable instance at the specified location.

Parameter

Type

Description

to

LocationOptions

LocationOptions.BEFORE

LocationOptions.AFTER

LocationOptions.AT_END

LocationOptions.AT_BEGINNING

LocationOptions.UNKNOWN

The location relative to the reference object or within the containing object. (Optional)

(default: LocationOptions.UNKNOWN)

reference

Varies

The reference object. Note: Required only when the to parameter specifies before or after. Can accept: TextVariableInstance, XmlStory, TextFrame, Story, Note, Cell, Footnote, Table, TextColumn, TextStyleRange, Text, InsertionPoint, Paragraph, Line, Word, Character or Change. (Optional)

withProperties

Object

Initial values for properties of the new TextVariableInstance (Optional)

TextVariableInstance anyItem ()

Returns any TextVariableInstance in the collection.

Number count ()

Displays the number of elements in the TextVariableInstance.

TextVariableInstance everyItem ()

Returns every TextVariableInstance in the collection.

TextVariableInstance firstItem ()

Returns the first TextVariableInstance in the collection.

TextVariableInstance item (index:Varies)

Returns the TextVariableInstance with the specified index or name.

Parameter

Type

Description

index

Varies

The index or name. Can accept: Long Integer or String.

TextVariableInstance itemByID (id:Number)

Returns the TextVariableInstance with the specified ID.

Parameter

Type

Description

id

Number

The ID.

TextVariableInstance itemByName (name:String)

Returns the TextVariableInstance with the specified name.

Parameter

Type

Description

name

String

The name.

TextVariableInstance itemByRange (from:Varies, to:Varies)

Returns the TextVariableInstances within the specified range.

Parameter

Type

Description

from

Varies

The TextVariableInstance, index, or name at the beginning of the range. Can accept: TextVariableInstance, Long Integer or String.

to

Varies

The TextVariableInstance, index, or name at the end of the range. Can accept: TextVariableInstance, Long Integer or String.

TextVariableInstance lastItem ()

Returns the last TextVariableInstance in the collection.

TextVariableInstance middleItem ()

Returns the middle TextVariableInstance in the collection.

TextVariableInstance nextItem (obj:TextVariableInstance)

Returns the TextVariableInstance whose index follows the specified TextVariableInstance in the collection.

Parameter

Type

Description

obj

TextVariableInstance

The TextVariableInstance whose index comes before the desired TextVariableInstance.

TextVariableInstance previousItem (obj:TextVariableInstance)

Returns the TextVariableInstance with the index previous to the specified index.

Parameter

Type

Description

obj

TextVariableInstance

The index of the TextVariableInstance that follows the desired TextVariableInstance.

String toSource ()

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

Object of

Cell.textVariableInstances

Table.textVariableInstances

Text.textVariableInstances

Character.textVariableInstances

Word.textVariableInstances

Line.textVariableInstances

TextColumn.textVariableInstances

Paragraph.textVariableInstances

TextStyleRange.textVariableInstances

InsertionPoint.textVariableInstances

TextFrame.textVariableInstances

Story.textVariableInstances

Change.textVariableInstances

Note.textVariableInstances

Footnote.textVariableInstances

XmlStory.textVariableInstances