Adobe InDesign CS5 (7.0) Object Model JS: Bookmarks

InDesign CS5

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 [] (index: number)
Returns the Bookmark with the specified index.

ParameterTypeDescription
indexnumberThe index.

Bookmark add (destination: varies[, 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: varies)
Returns the Bookmark with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer 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: varies, to: varies)
Returns the Bookmarks within the specified range.

ParameterTypeDescription
fromBookmark
Long Integer
String
The Bookmark, index, or name at the beginning of the range. Can accept: Bookmark, Long Integer or String.
toBookmark
Long Integer
String
The Bookmark, index, or name at the end of the range. Can accept: Bookmark, Long Integer 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, 20-Jun-2010 v3.0.3dContents :: Index