Adobe InDesign CS6 (8.0) Object Model JS: Articles

InDesign CS6

Class

Articles

 A collection of articles.

QuickLinks

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

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

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

ParameterTypeDescription
indexnumberThe index.

Article add ([name: string][, articleExportStatus: bool][, at: LocationOptions=LocationOptions.AT_END][, reference: Article][, withProperties: Object])
Creates a new Article

ParameterTypeDescription
namestringThe article name (Optional)
articleExportStatusboolThe article's export status (Optional)
atLocationOptions:
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.AT_END)
referenceArticleThe reference object. Note: Required when the to value specifies before or after. (Optional)
withPropertiesObjectInitial values for properties of the new Article (Optional)

Article anyItem ()
Returns any Article in the collection.

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

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

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

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

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

Article itemByID (id: number)
Returns the Article with the specified ID.

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

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

ParameterTypeDescription
fromArticle
Long Integer
String
The Article, index, or name at the beginning of the range. Can accept: Article, Long Integer or String.
toArticle
Long Integer
String
The Article, index, or name at the end of the range. Can accept: Article, Long Integer or String.

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

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

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

ParameterTypeDescription
objArticleThe Article whose index comes before the desired Article.

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

ParameterTypeDescription
objArticleThe index of the Article that follows the desired Article.

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

Element of

Document.articles

Jongware, 28-Apr-2012 v3.0.3hContents :: Index