InDesign2026
API 21.5.1.73
Collection of TextBox

TextBoxes

A collection of text boxes.

Properties

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

Methods

TextBox

Returns the TextBox with the specified index.

index Number The index.
TextBox

Creates a new TextBox

layer? Layer The layer on which to create the TextBox.
at? LocationOptions The location at which to insert the TextBox relative to the reference object or within the container object.
reference? Document | Layer | MasterSpread | Page | Spread | PageItem The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem.
withProperties? Object Initial values for properties of the new TextBox
TextBox

Returns any TextBox in the collection.

Number

Displays the number of elements in the TextBox.

TextBox[]

Returns every TextBox in the collection.

TextBox

Returns the first TextBox in the collection.

TextBox

Returns the TextBox with the specified index or name.

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

Returns the TextBox with the specified ID.

id Number The ID.
TextBox

Returns the TextBox with the specified name.

name String The name.
TextBox[]

Returns the TextBoxes within the specified range.

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

Returns the last TextBox in the collection.

TextBox

Returns the middle TextBox in the collection.

TextBox

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

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

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

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

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

Object of 31

Properties elsewhere that hold a TextBoxes.