【发布时间】:2019-02-15 19:36:46
【问题描述】:
我正在使用 ews-js-api-browser 开发 Outlook 桌面插件。
EwsJS 命名空间目前使用<script> 标签导入,如office-js 库。
Office.initialize = function (reason) {
EwsJS.ConfigureForOutlook()
EwsJS.EwsLogging.DebugLogEnabled = false
}
const functionWhichNeedAttachment = () => {
Office.context.mailbox.getCallbackTokenAsync((token) => {
const exch = new EwsJS.ExchangeService(EwsJS.ExchangeVersion.Exchange2016)
exch.Credentials = new EwsJS.OAuthCredentials(token.value)
exch.Url = new EwsJS.Uri(Office.context.mailbox.ewsUrl)
exch.GetAttachments(
[Office.context.mailbox.item.attachments[0].id],
1,
null).then(res => console.log('res', res))
})
})
}
我收到此错误:
对象不支持此操作 ExchangeWebService.js (41867, 9)
似乎 ExchangeWebService 正在尝试为禁止的关键字分配值。
【问题讨论】: