Adobe InDesign CS4 (6.0) Object Model JS: DataMergeFields

InDesign CS4

Class

DataMergeFields

 A collection of data merge fields.

QuickLinks

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

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

DataMergeField [] (index: number)
Returns the DataMergeField with the specified index.

ParameterTypeDescription
indexnumberThe index.

DataMergeField anyItem ()
Returns any DataMergeField in the collection.

number count ()
Displays the number of elements in the DataMergeField.

Array of DataMergeField everyItem ()
Returns every DataMergeField in the collection.

DataMergeField firstItem ()
Returns the first DataMergeField in the collection.

DataMergeField item (index: any)
Returns the DataMergeField with the specified index or name.

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

DataMergeField itemByName (name: string)
Returns the DataMergeField with the specified name.

ParameterTypeDescription
namestringThe name.

Array of DataMergeField itemByRange (from: any, to: any)
Returns the DataMergeFields within the specified range.

ParameterTypeDescription
fromDataMergeField
Long Integer
String
The DataMergeField, index, or name at the beginning of the range. Can accept: DataMergeField, Long Integer or String.
toDataMergeField
Long Integer
String
The DataMergeField, index, or name at the end of the range. Can accept: DataMergeField, Long Integer or String.

DataMergeField lastItem ()
Returns the last DataMergeField in the collection.

DataMergeField middleItem ()
Returns the middle DataMergeField in the collection.

DataMergeField nextItem (obj: DataMergeField)
Returns the DataMergeField whose index follows the specified DataMergeField in the collection.

ParameterTypeDescription
objDataMergeFieldThe DataMergeField whose index comes before the desired DataMergeField.

DataMergeField previousItem (obj: DataMergeField)
Returns the DataMergeField with the index previous to the specified index.

ParameterTypeDescription
objDataMergeFieldThe index of the DataMergeField that follows the desired DataMergeField.

string toSource ()
Generates a string which, if executed, will return the DataMergeField.

Element of

DataMerge.dataMergeFields

Jongware, 20-Jun-2010 v3.0.3dContents :: Index