Office JS 加载项问题 - 检测与会者变化
Office JS AddIn Question - Detecting Attendee Change
我正在开发一个 Office JS 加载项,它需要在 Office 365 Outlook 中创建新的 appointment/meeting 以调用某些函数时进行检测。我 运行 在 Microsoft 的站点上进入以下内容:
我尝试使用:
<br />
Office.context.mailbox.addHandlerAsync(Office.RecipientsChangedFields, 函数(){
...
}
但这似乎不正确,有人知道吗?
您需要在 item
对象上设置事件处理程序,而不是邮箱:
Office.context.mailbox.item.addHandlerAsync(
Office.EventType.RecipientsChanged,
() => {
console.log("Recipients changed");
},
(asyncResult) => {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.error(asyncResult.error);
reject();
} else {
resolve();
}
}
);
我正在开发一个 Office JS 加载项,它需要在 Office 365 Outlook 中创建新的 appointment/meeting 以调用某些函数时进行检测。我 运行 在 Microsoft 的站点上进入以下内容:
我尝试使用:
<br />
Office.context.mailbox.addHandlerAsync(Office.RecipientsChangedFields, 函数(){
...
}
但这似乎不正确,有人知道吗?
您需要在 item
对象上设置事件处理程序,而不是邮箱:
Office.context.mailbox.item.addHandlerAsync(
Office.EventType.RecipientsChanged,
() => {
console.log("Recipients changed");
},
(asyncResult) => {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.error(asyncResult.error);
reject();
} else {
resolve();
}
}
);