1

Edit: In addition to the original question below, I am finding that every method in the MessageCompose interface gets delayed when using Outlook for Windows, versus Outlook for Mac, so it's not just the file attachment but, for example, inserting a subject line (Office.context.mailbox.item.subject.setAsync).

I am using addFileAttachmentAsync to attach a file to new email, and it takes around 12 seconds for the attachment to load on Outlook for Mac, but takes 45+ seconds to load using Outlook for Windows, if it doesn't time out altogether.

Why is there such a large discrepancy between how this function works on the two platforms?

I tested this using a sample payload I found in another SO post:

Code:

 attachFile() {
    return new Promise((resolve, reject) => {
      Office.context.mailbox.item.addFileAttachmentAsync(
        'http://i.imgur.com/WJXklif.png',
        'cute_bird.png',
        { 
          "asyncContext" : { foo: 0, bar: 1, baz: true }
        },
        (asyncResult) => {
          if (asyncResult.status == Office.AsyncResultStatus.Failed) {
            reject(asyncResult.error);
          } else {
            const attachmentID = asyncResult.value;
            resolve(attachmentID);
          }

Outlook versions:

  • Outlook for Mac (v16.34 (20020900))
  • Outlook for Windows (build 16.0.4966.1000)
toothgrinder
  • 83
  • 1
  • 5
  • We haven't had any customers complain about huge performance differences between Windows Outlook and Mac Outlook. In your measurement, did you measure from the time the addFileAttachmentAsync API was invoked until your callback was invoked, or did you perform a broader measurement? – Outlook Add-ins Team - MSFT Apr 02 '20 at 22:41

0 Answers0