InDesign2026
API 21.5.1.73
Collection of Snippet

Snippets

A collection of IDML snippets.

Properties

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

Methods

→ Snippet

Returns the Snippet with the specified index.

index Number The index.
→ Snippet

Returns any Snippet in the collection.

→ Number

Displays the number of elements in the Snippet.

→ Snippet[]

Returns every Snippet in the collection.

→ Snippet

Returns the first Snippet in the collection.

→ Snippet

Returns the Snippet with the specified index or name.

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

Returns the Snippet with the specified ID.

id Number The ID.
→ Snippet

Returns the Snippet with the specified name.

name String The name.
→ Snippet[]

Returns the Snippets within the specified range.

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

Returns the last Snippet in the collection.

→ Snippet

Returns the middle Snippet in the collection.

→ Snippet

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

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

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

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

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

Object of 1

Properties elsewhere that hold a Snippets.