prevent task pane from closing during saving (async)

落花浮王杯 提交于 2019-12-06 06:43:51

问题


We use the OfficeJs REST API for add-in development. To use this API, an accesstoken is needed, which we request by invoking Office.mailbox.getCallbackTokenAsync({ isRest: true }) during startup of our add-in.

This does not fail for any code triggered by the onSend function: It seems OfficeJs saves the mail item before onSend code is triggered.

However, this request apparently does fail when the mail item is not yet saved - which is the case for any new draft when it is just created - and thus breaks the init code of our add-in when the task pane is opened straight after composing a new message.

To remedy that, one can call Office.messageCompose.saveAsync. This however causes the task pane to disappear as the current mail item is refreshed (hypothesis).

Is there anything that we can do to prevent the task pane from being closed after calling saveAsync or retrieve the REST access token without having to save the mail item first ?


回答1:


To avoid the issue of the Task Pane closing, please use the new version of Outlook Web. The bug has been fixed in this version of Outlook.



来源:https://stackoverflow.com/questions/50565850/prevent-task-pane-from-closing-during-saving-async

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!