Adobe InDesign CS3 (5.0) Object Model JS: Documents

InDesign CS3

Class

Documents

 A collection of documents.

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

Document add ([showingWindow: bool=true][, documentPreset: DocumentPreset][, withProperties: Object])
Creates a new document.

ParameterTypeDescription
showingWindowboolIf true, displays the document. (Optional) (default: true)
documentPresetDocumentPresetThe document preset to use. (Optional)
withPropertiesObjectInitial values for properties of the new Document (Optional)

Document anyItem ()
Returns any Document in the collection.

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

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

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

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

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

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

ParameterTypeDescription
namestringThe name.

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

ParameterTypeDescription
fromDocument
Long Integer
String
The Document, index, or name at the beginning of the range. Can accept: Document, Long Integer or String.
toDocument
Long Integer
String
The Document, index, or name at the end of the range. Can accept: Document, Long Integer or String.

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

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

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

ParameterTypeDescription
objDocumentThe Document whose index comes before the desired Document.

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

ParameterTypeDescription
objDocumentThe index of the Document that follows the desired Document.

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

Element of

Application.documents

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