extensionCommonCustomControlMenuItem object

Configures the items for a menu control.

Properties that reference this object type:

Syntax

{
  "id": "{string}",
  "type": "menuItem",
  "label": "{string}",
  "icons": [
    {
      "size": {number},
      "url": "{string}"
    }
  ],
  "supertip": {
    "title": "{string}",
    "description": "{string}"
  },
  "actionId": "{string}",
  "enabled": {boolean},
  "overriddenByRibbonApi": {boolean}
}

Properties

id

Specifies the ID for a menu item.

Type
string

Required

Constraints
Maximum string length: 64.

Supported values

type

Defines the menu item's control type.

Type
string

Required

Constraints

Supported values
Allowed values: menuItem.

label

Specifies the text displayed for the menu item.

Type
string

Required

Constraints
Maximum string length: 64.

Supported values

icons

Configures the icons for the menu item.

Type
Array of extensionCommonIcon

Required

Constraints
Minimum array items: 1. Maximum array items: 3.

Supported values

supertip

Configures a supertip for the menu item. A supertip is a UI feature that displays a brief box of help information about a control when the cursor hovers over it. The box may contain multiple lines of text.

Required

Constraints

Supported values

actionId

Specifies the ID of the action that is taken when a user selects the control or menu item. The actionId must match with some runtimes.actions.id property value.

Type
string

Required

Constraints
Maximum string length: 64.

Supported values

enabled

Indicates whether the menu item is initially enabled.

Type
boolean

Required

Constraints

Supported values
Default value: True.

overriddenByRibbonApi

Specifies whether the menu item is hidden on application and platform combinations which support the API (Office.ribbon.requestCreateControls). This API installs custom contextual tabs on the ribbon.

Type
boolean

Required

Constraints

Supported values
Default value: false.

Examples

{
  "items": [
    {
      "id": "menuItem1",
      "type": "menuItem",
      "label": "Action 2",
      "supertip": {
        "title": "Action 2 Title",
        "description": "Action 2 Description"
      },
      "actionId": "action2"
    },
  ]
}