Adobe InDesign CS2 (4.0) Object Model JS: Bookmarks

InDesign CS2

Class

Bookmarks

 A collection of bookmarks.

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

Bookmark add (destination: any[, withProperties: Object])
Creates a new bookmark.

ParameterTypeDescription
destinationHyperlinkExternalPageDestination
HyperlinkPageDestination
HyperlinkTextDestination
Page
The bookmark destination. Can accept: HyperlinkTextDestination, HyperlinkPageDestination, HyperlinkExternalPageDestination or Page.
withPropertiesObjectInitial values for properties of the new Bookmark (Optional)

Bookmark anyItem ()
Returns any Bookmark in the collection.

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

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

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

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

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

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

ParameterTypeDescription
fromBookmark
Long
String
The Bookmark, index, or name at the beginning of the range. Can accept: Bookmark, Long or String.
toBookmark
Long
String
The Bookmark, index, or name at the end of the range. Can accept: Bookmark, Long or String.

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

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

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

ParameterTypeDescription
objBookmarkThe Bookmark whose index comes before the desired Bookmark.

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

ParameterTypeDescription
objBookmarkThe index of the Bookmark that follows the desired Bookmark.

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

Element of

Bookmark.bookmarks

Document.bookmarks

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