用于检测 Office Addin API 上的保存事件的处理程序
在 Office 中。 Microsoft Office Addin JS API 中的 AppointmentCompose
接口,是否有任何处理程序可以检测用户在 Outlook 事件中单击“保存”按钮或按下 CTRL+S
时的情况?
我发现 这个,但这仅适用于加载项内的按钮
// 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();
}
我还发现了这个事件列表,但它们不包括保存
事件。
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?
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前,您请求的功能:保存事件不是产品的一部分。我们在技术社区页面上跟踪 Outlook 加载项功能请求。请在那里提交您的请求并选择适当的标签。当我们进行规划过程时,会考虑技术社区上的功能请求。
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.
否,Office Web 加载项没有可用的此类事件。
您可以考虑开发一个基于 VSTO 的加载项,您可以在其中重新调整功能区按钮的用途,请参阅 暂时重新利用 Office Fluent 功能区上的命令了解详细信息。
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.