我在使用Office.EventType.RecipientsChanged进行Outlook时遇到了困难。
我在Windows和Outlook.com上测试过这个。Mac显然还不支持1.7。
这是使用以下代码块时所遇到的错误:函数addHandlerAsync有无效的参数。
$(document).ready(function () {
try {
if(Office.context.requirements.isSetSupported('MailBox', '1.7')) {
console.log('MailBox 1.7 supported');
Office.context.mailbox.addHandlerAsync(Office.EventType.RecipientsChanged, function(result){
if (result.status === Office.AsyncResultStatus.Failed) {
console.log("Error with event handler.");
}
else {
processRecipientsChanged();
}
});
}
}catch(e){
console.log(e);
}发布于 2020-04-27 05:40:23
因为RecipientsChanged事件发生在项的作用域中,所以调用是Office.context.mailbox.item.addHandlerAsync。请参阅https://learn.microsoft.com/en-us/office/dev/add-ins/reference/objectmodel/requirement-set-1.8/office.context.mailbox.item#addhandlerasynceventtype-handler-options-callback
https://stackoverflow.com/questions/61333153
复制相似问题