Adobe InCopy CS6 (8.0) Object Model JS: TextMacros

InCopy CS6

Class

TextMacros

 A collection of text macros.

See also TextMacro.

QuickLinks

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

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

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

ParameterTypeDescription
indexnumberThe index.

TextMacro add (name: string, expansion: string[, withProperties: Object])
Creates a new text macro.

ParameterTypeDescription
namestringThe name of the macro.
expansionstringThe expansion text to substitute for the text macro.
withPropertiesObjectInitial values for properties of the new TextMacro (Optional)

TextMacro anyItem ()
Returns any TextMacro in the collection.

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

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

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

TextMacro item (index: varies)
Returns the TextMacro with the specified index or name.

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

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

ParameterTypeDescription
namestringThe name.

Array of TextMacro itemByRange (from: varies, to: varies)
Returns the TextMacros within the specified range.

ParameterTypeDescription
fromLong Integer
String
TextMacro
The TextMacro, index, or name at the beginning of the range. Can accept: TextMacro, Long Integer or String.
toLong Integer
String
TextMacro
The TextMacro, index, or name at the end of the range. Can accept: TextMacro, Long Integer or String.

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

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

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

ParameterTypeDescription
objTextMacroThe TextMacro whose index comes before the desired TextMacro.

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

ParameterTypeDescription
objTextMacroThe index of the TextMacro that follows the desired TextMacro.

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

Element of

Application.textMacros

Jongware, 29-Apr-2012 v3.0.3iContents :: Index