在MS Outlook Addin中设置收件人

问题描述 投票:0回答:1

我试图动态添加recipientrequiredAttendees进行Outlook约会

var arr = [{emailAddress: '[email protected]', displayName: 'Test Name'}]
Office.context.mailbox.item.requiredAttendees.addAsync(arr)

(also fails with arr = ['[email protected]'])

这是一个错误

Sys.ArgumentException: Sys.ArgumentException: 
Value does not fall within the expected range.

怎么可能完成?

参看docs which I am following

参看Radio-silence Github issue


更新屏幕拍摄

Array.isInstanceOfType before Throw

PRE-THROW

  • 您可以注意到n被正确定义为具有1个值的数组(右侧面板)
  • 从控制台检查与arr相同的数组计算为true

Outlook Recipients Array Throw Error

Throw

  • 该评论的脚本是throwing(由浅绿色突出显示)
outlook outlook-addin outlook-web-addins
1个回答
1
投票

为了获得动态URL参数,我在O​​ffice初始化时加载iframe onInit

虽然API的其余部分在传入时可用于加载的iframe,但是这个API的特定部分必须依赖于window

在iframe之外移动API调用可以解决问题并使其按预期工作。

© www.soinside.com 2019 - 2024. All rights reserved.