用于检测 Office 加载项上的保存事件的处理程序 API

Handler to detect Save event on Office Addin API

在 Microsoft Office Addin JS Office.AppointmentCompose 界面 API 中,是否有任何处理程序可以检测用户何时在 Outlook 事件中单击“保存”按钮或何时按下 CTRL+S

我找到了 this,但这仅适用于插件内的按钮

// 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();
}

我也找到了这个 list 事件,但它们不包括 save 事件。

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

否,Office 网络没有此类活动可用 add-ins。

您可以考虑开发基于 add-in 的 VSTO,您可以在其中重新调整功能区按钮的用途,有关详细信息,请参阅 Temporarily Repurpose Commands on the Office Fluent Ribbon

目前您请求的功能:保存事件不是产品的一部分。我们在 Tech Community Page 上跟踪 Outlook add-in 功能请求。请在那里提交您的请求并选择合适的标签。在我们进行规划过程时,会考虑技术社区的功能请求。