Handler to detect Save event on Office Addin API

In Office.AppointmentCompose interface from Microsoft Office Addin JS API, is there any handler to detect when the user clicks the Save button or when presses CTRL+S, in an Outlook Event?

enter image description here

I found this, but this is only applicable to buttons inside the Add-in

// In this example, consider a button defined in an add-in manifest as follows:
//<Control xsi:type="Button" id="eventTestButton">
//    <Label resid="eventButtonLabel" />
//    <Tooltip resid="eventButtonTooltip" />
//    <Supertip>
//        <Title resid="eventSuperTipTitle" />
//        <Description resid="eventSuperTipDescription" />
//    </Supertip>
//    <Icon>
//        <bt:Image size="16" resid="blue-icon-16" />
//        <bt:Image size="32" resid="blue-icon-32" />
//        <bt:Image size="80" resid="blue-icon-80" />
//    </Icon>
//    <Action xsi:type="ExecuteFunction">
//        <FunctionName>testEventObject</FunctionName>
//    </Action>
//</Control>

// The button has an id attribute set to eventTestButton, and will invoke
// the testEventObject function defined in the add-in.
// That function looks like this:
function testEventObject(event) {
    // The event object implements the Event interface.

    // This value will be "eventTestButton".
    var buttonId = event.source.id;

    // Signal to the host app that processing is complete.
    event.completed();
}

I also found this list of events, but they don't include save event.

Upvotes: 0

Views: 607

Answers (2)

user7823505
user7823505

Reputation:

Currently the feature: save event, you requested, is not a part of the product. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

Upvotes: 2

Eugene Astafiev
Eugene Astafiev

Reputation: 49395

is there any handler to detect when the user clicks the Save button or when presses CTRL+S, in an Outlook Event?

No, there is no such events available for Office web add-ins.

You may consider developing a VSTO based add-in where you could repurpose ribbon buttons, see Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.

Upvotes: 1

Related Questions