TextTextVariableInstances

A collection of text variable instances.

Instance Properties

Name Description Access
length number The number of objects in the collection. read-only

Methods

add(
[to], reference ​[, withProperties])
 → TextVariableInstance
count(
)
 → number
item(
index)
 → TextVariableInstance
itemByRange(
from, to)
 → TextVariableInstance
toSource(
)
 → string
add(
[to=LocationOptions.UNKNOWN], reference ​[, withProperties])
 → TextVariableInstance
Creates a text variable instance at the specified location.
to LocationOptions The location relative to the reference object or within the containing object. (Optional)
reference The reference object. Note: Required only when the to parameter specifies before or after. Can accept: TextVariableInstance, XmlStory, TextFrame, EndnoteTextFrame, 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)
anyItem(
)
 → TextVariableInstance
Returns any TextVariableInstance in the collection.
count(
)
 → number
Displays the number of elements in the TextVariableInstance.
everyItem(
)
 → TextVariableInstance
Returns every TextVariableInstance in the collection.
firstItem(
)
 → TextVariableInstance
Returns the first TextVariableInstance in the collection.
item(
index)
 → TextVariableInstance
Returns the TextVariableInstance with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → TextVariableInstance
Returns the TextVariableInstance with the specified ID.
id number The ID.
itemByName(
name)
 → TextVariableInstance
Returns the TextVariableInstance with the specified name.
name string The name.
itemByRange(
from, to)
 → TextVariableInstance
Returns the TextVariableInstances within the specified range.
from The TextVariableInstance, index, or name at the beginning of the range. Can accept: TextVariableInstance, Long Integer or String.
to The TextVariableInstance, index, or name at the end of the range. Can accept: TextVariableInstance, Long Integer or String.
lastItem(
)
 → TextVariableInstance
Returns the last TextVariableInstance in the collection.
middleItem(
)
 → TextVariableInstance
Returns the middle TextVariableInstance in the collection.
nextItem(
obj)
 → TextVariableInstance
Returns the TextVariableInstance whose index follows the specified TextVariableInstance in the collection.
obj TextVariableInstance The TextVariableInstance whose index comes before the desired TextVariableInstance.
previousItem(
obj)
 → TextVariableInstance
Returns the TextVariableInstance with the index previous to the specified index.
obj TextVariableInstance The index of the TextVariableInstance that follows the desired TextVariableInstance.
toSource(
)
 → string
Generates a string which, if executed, will return the TextVariableInstance.