InDesign2026
API 21.5.1.73
Collection of CharacterStyle

CharacterStyles

A collection of character styles.

Properties

NameType AccessDescription
LongInteger | NothingEnum
readonly The number of objects in the collection. Can return: Long Integer or NothingEnum enumerator.

Methods

CharacterStyle

Returns the CharacterStyle with the specified index.

index Number The index.
CharacterStyle

Creates a new CharacterStyle.

withProperties? Object Initial values for properties of the new CharacterStyle
CharacterStyle

Returns any CharacterStyle in the collection.

Number

Displays the number of elements in the CharacterStyle.

CharacterStyle[]

Returns every CharacterStyle in the collection.

CharacterStyle

Returns the first CharacterStyle in the collection.

CharacterStyle

Returns the CharacterStyle with the specified index or name.

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

Returns the CharacterStyle with the specified ID.

id Number The ID.
CharacterStyle

Returns the CharacterStyle with the specified name.

name String The name.
CharacterStyle[]

Returns the CharacterStyles within the specified range.

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

Returns the last CharacterStyle in the collection.

CharacterStyle

Returns the middle CharacterStyle in the collection.

CharacterStyle

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

obj CharacterStyle The CharacterStyle whose index comes before the desired CharacterStyle.
CharacterStyle

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

obj CharacterStyle The index of the CharacterStyle that follows the desired CharacterStyle.
String

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

Object of 3

Properties elsewhere that hold a CharacterStyles.