InDesign2026
API 21.5.1.73
Collection of Submenu

Submenus

A collection of submenus.

Properties

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

Methods

Submenu

Returns the Submenu with the specified index.

index Number The index.
Submenu

Creates a new submenu.

title String The name of the Submenu for display in the user interface. The title includes any ampersand characters (&), which are used to tell the Windows OS to underline the following character in the name for use with the Alt key to navigate to a menu item. Double ampersands are used to display an actual ampersand character in the name. The Mac OS ignores and removes the extra ampersand characters.
at? LocationOptions The location of the submenu relative to the reference object or within the containing object.
reference? MenuElement The reference object. Note: Required when the at parameter specifies before or after.
withProperties? Object Initial values for properties of the new Submenu
Submenu

Returns any Submenu in the collection.

Number

Displays the number of elements in the Submenu.

Submenu[]

Returns every Submenu in the collection.

Submenu

Returns the first Submenu in the collection.

Submenu

Returns the Submenu with the specified index or name.

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

Returns the Submenu with the specified name.

name String The name.
Submenu[]

Returns the Submenus within the specified range.

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

Returns the last Submenu in the collection.

Submenu

Returns the middle Submenu in the collection.

Submenu

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

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

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

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

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

Object of 2

Properties elsewhere that hold a Submenus.