Office.js issue with fetching “to” field of a message in Outlook for Mac 16.18 (181014)

107 Views Asked by At

I’m working on an add-in for Microsoft Outlook, and I’ve noticed that in the latest version of Outlook for Mac, 16.18 (181014), our add-in is unable to retrieve recipients of a draft that’s just been created. Our add-in is attempting to fetch the recipients using office.js’s Office.context.mailbox.item.to.getAsync() method. To reproduce this issue:

  1. While reading an email in your inbox, click the “reply” button to begin drafting a new email; the new draft should automatically have a recipient in the “to” field because it is a reply.
  2. From this draft, open an add-in which will try to fetch the draft’s “to” recipients by calling Office.context.mailbox.item.to.getAsync(). No recipients will be found.
  3. In the “to” field of the draft, add an additional recipient, and then remove this recipient.
  4. Try to fetch the recipient from your add-in again by calling Office.context.mailbox.item.to.getAsync() - this time you will be given the “to” recipients correctly.

We’ve only noticed this issue in version 16.18 (181014). It appears that the user must manually edit the “to” field before the getAsync() method is able to give us its contents.

0

There are 0 best solutions below