Compartilhar via


extensionAutoRunEventsArray object

The extensions.autoRunEvents property defines event-based activation extension points.

Properties that reference this object type:

Syntax

{
  "requirements": {
    "capabilities": [
      {
        capabilities object
      }
    ],
    "scopes": [
      "mail | workbook | document | presentation"
    ],
    "formFactors": [
      "desktop | mobile"
    ]
  },
  "events": [
    {
      "type": "{string}",
      "actionId": "{string}",
      "options": {
        options object
      }
    }
  ]
}
{
  "requirements": {
    "capabilities": [
      {
        capabilities object
      }
    ],
    "scopes": [
      "mail | workbook | document | presentation"
    ],
    "formFactors": [
      "desktop | mobile"
    ]
  },
  "events": [
    {
      "type": "{string}",
      "actionId": "{string}",
      "options": {
        options object
      }
    }
  ]
}

Properties

requirements

Specifies the scopes, formFactors, and Office JavaScript library requirement sets that must be supported on the Office client in order for the event handling code to run. For more information, see Specify Office Add-in requirements in the unified manifest for Microsoft 365.

Required

Constraints

Supported values

events

Configures the event that cause actions in an Outlook Add-in to run automatically. For example, see use smart alerts and the OnMessageSend and OnAppointmentSend events in your Outlook Add-ins.

Type
Array of events

Required

Constraints
Maximum array items: 20.

Supported values

Examples

{
    "events": [
      {
        "type": "newMessageComposeCreated",
        "actionId": "onNewMessageComposeCreated"
      },
      {
        "type": "messageSending",
        "actionId": "onMessageSending",
        "options": {
          "sendMode": "promptUser"
        }
      }
    ]
}