InDesign2026
API 21.5.1.73
Collection of Topic

Topics

A collection of index topics.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

→ Topic

Returns the Topic with the specified index.

index Number The index.
→ Topic

Creates a new index topic.

name String The name of the topic. Note: This is the text that appears in the index.
sortBy? String The string to sort this topic by instead of the topic name. Note: The actual topic text, rather than the sort order text, appears in the index.
withProperties? Object Initial values for properties of the new Topic
→ Topic

Returns any Topic in the collection.

→ Number

Displays the number of elements in the Topic.

→ Topic[]

Returns every Topic in the collection.

→ Topic

Returns the first Topic in the collection.

→ Topic

Returns the Topic with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
→ Topic

Returns the Topic with the specified name.

name String The name.
→ Topic[]

Returns the Topics within the specified range.

from LongInteger | Topic | String The Topic, index, or name at the beginning of the range. Can accept: Topic, Long Integer or String.
to LongInteger | Topic | String The Topic, index, or name at the end of the range. Can accept: Topic, Long Integer or String.
→ Topic

Returns the last Topic in the collection.

→ Topic

Returns the middle Topic in the collection.

→ Topic

Returns the Topic whose index follows the specified Topic in the collection.

obj Topic The Topic whose index comes before the desired Topic.
→ Topic

Returns the Topic with the index previous to the specified index.

obj Topic The index of the Topic that follows the desired Topic.
→ String

Generates a string which, if executed, will return the Topic.

Object of 3

Properties elsewhere that hold a Topics.