In this article

Office.AddinCommands.Event interface

The event object is passed as a parameter to add-in functions invoked by UI-less command buttons. The object allows the add-in to identify which button was clicked and to signal the host that it has completed its processing.

Properties

A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property.

Methods

Indicates that the add-in has completed processing that was triggered by an add-in command button or event handler.

This method must be called at the end of a function which was invoked by an add-in command defined with an Action element with an xsi:type attribute set to ExecuteFunction. Calling this method signals the host client that the function is complete and that it can clean up any state involved with invoking the function. For example, if the user closes Outlook before this method is called, Outlook will warn that a function is still executing.

This method must be called in an event handler added via Office.context.mailbox.addHandlerAsync after completing processing of the event.

Property Details

source

Information about the control that triggered calling this function.

Support details

A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property.

Method Details

completed(options)

Indicates that the add-in has completed processing that was triggered by an add-in command button or event handler.

This method must be called at the end of a function which was invoked by an add-in command defined with an Action element with an xsi:type attribute set to ExecuteFunction. Calling this method signals the host client that the function is complete and that it can clean up any state involved with invoking the function. For example, if the user closes Outlook before this method is called, Outlook will warn that a function is still executing.

This method must be called in an event handler added via Office.context.mailbox.addHandlerAsync after completing processing of the event.

Parameters

options

{ allowEvent: boolean }

Optional. An object literal that contains one or more of the following properties. allowEvent: A boolean value. When the completed method is used to signal completion of an event handler, this value indicates of the handled event should continue execution or be canceled. For example, an add-in that handles the ItemSend event can set allowEvent = false to cancel sending of the message.

Returns

void

Remarks

A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method.