''getAsync'返回'Office.context.mailbox.item.body.getAsync不是函数'

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

我目前正在使用Javascript API研究Microsoft Outlook加载项的文档,并下载了Microsoft提供的示例之一,特别是Github中的“ outlook-add-in-command-demo”。

然后我在FunctionFile\Function.js之前的行[[61上修改了fileevent.completed();),并添加了以下内容:

Office.context.mailbox.item.body.replaceAsync( 'Hello world!', { coercionType: Office.CoercionType.Text }, function callback(result) { });
这段代码来自API文档本身replaceAsyncdocs

测试外接程序功能时,在开发人员控制台上出现以下错误:

未捕获的TypeError:Office.context.mailbox.item.body.replaceAsync是不是功能在Object.getSubject [作为回调](Functions.js:62)在Outlook-Web-16.01.js:16
同一文件的

53]行]包含对Office API的类似调用,并且此调用可以正常工作(var subject = Office.context.mailbox.item.subject;)。但是replaceAsyncgetAsyncsetAsync和其他仅会产生相同的错误。

任何线索?

我目前正在使用Javascript API研究Microsoft Outlook加载项的文档,并下载了Microsoft提供的示例之一,特别是'outlook-add-in-command -...

office-js outlook-web-addins
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.