我正在尝试将recipient
动态添加到requiredAttendees
以便进行Outlook约会
var arr = [{emailAddress: 'test@example.com', displayName: 'Test Name'}]
Office.context.mailbox.item.requiredAttendees.addAsync(arr)
(also fails with arr = ['test@example.com'])
它抛出一个错误
Sys.ArgumentException: Sys.ArgumentException:
Value does not fall within the expected range.
那怎么实现?
Cf。 Radio-silence Github issue
n
已正确定义为具有1个值的数组(右侧)arr
相同的数组将得出true
throwing
(如浅绿色突出显示所示)答案 0 :(得分:1)
要获取动态URL参数,我在Office初始化完成后正在加载iframe onInit
。
尽管传入的iframe可以使用其余的API,但是该API的固有部分必须依赖于window
。
将API调用移至iframe之外可解决此问题,并使它按预期工作。