Office 365 Outlook REST API - Office.context.mailbox.displayMessageForm not working on Mac Outlook

送分小仙女□ 提交于 2020-03-05 03:25:48

问题


I'm currently facing an issue with Outlook object model of the API in all versions from v1.1 and higher on Mac Outlook 2016 (V16.15.0 and up). The method Office.context.mailbox.displayMessageForm is not working on Outlook for Mac. On Windows as well as on the online versions everything is working fine.

Current situation: I wrote an outlook add-in which creates a new draft of an email (saved in draft folder via usage of EWS envelope) and opens the new draft by using the outlook add-in API (method: Office.context.mailbox.displayMessageForm - https://docs.microsoft.com/de-de/office/dev/add-ins/reference/objectmodel/requirement-set-1.5/office.context.mailbox#displaymessageformitemid). The add-in is working fine in Outlook on the web (old version as well as the new version in office 365) in Chrome, Firefox, IE, Edge and Safari independently of the browser versions. Outlook 2016 in the latest builds on Windows 10 is also working fine. Unfortunately, under Outlook 2016 for Mac the add-in is unable to open the message window. No error occurs. However, the draft was successfully created. The problem exists since nearly 6 months and I wasn't able to finde the root cause due to the limited Outlook for Mac troubleshooting functionalities.

The add-in is publicly available via MS AppSource (https://appsource.microsoft.com/de-de/product/office/WA104381616?tab=Reviews). Unfortunately, I'm because of the described issue not able to publish a new version. Microsoft support isn't helpful.

If there are further questions, just comment. Every help or hints are very much appreciated. Thanks in advance for your support! Thomas


回答1:


displayMessageForm() API is not working on Outlook for Mac, because the Outlook client does not know about the new message yet.

Basically the issue is because your add-in tries to access the item, but the item is not yet synced to the client. Adding some delay before calling displayMessageForm should fix your issue.



来源:https://stackoverflow.com/questions/55461837/office-365-outlook-rest-api-office-context-mailbox-displaymessageform-not-work

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