InDesign2026
API 21.5.1.73
Collection of Group

Groups

A collection of groups.

Properties

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

Methods

Group

Returns the Group with the specified index.

index Number The index.
Group

Creates a new Group.

groupItems PageItem[] The objects to group.
layer? Layer The layer on which to create the Group.
at? LocationOptions The location at which to insert the Group 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 Group
Group

Returns any Group in the collection.

Number

Displays the number of elements in the Group.

Group[]

Returns every Group in the collection.

Group

Returns the first Group in the collection.

Group

Returns the Group with the specified index or name.

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

Returns the Group with the specified ID.

id Number The ID.
Group

Returns the Group with the specified name.

name String The name.
Group[]

Returns the Groups within the specified range.

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

Returns the last Group in the collection.

Group

Returns the middle Group in the collection.

Group

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

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

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

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

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

Object of 38

Properties elsewhere that hold a Groups.