Rob Blackin
Rob Blackin

Reputation: 11

Download File from link in Outlook Task Pane

I am building an office-js addin for Outlook and have hit a hard snag. On a ReadMessage TaskPane I massage some data and end up with a Base64 representation of a binary file. I can create a Blob or data: href for it and I create a link. In Outlook for the web, I am able to get it to download the file without a problem.

However, I have not been able to figure out a way to download it from Outlook for Windows/Mac Desktop.

Tried using download.js and Filesaver.js. Blob URLs, etc. I cant seem to get the file to be downloaded from the Windows or Mac desktop.

How can this be accomplished?

thanks!

Upvotes: 1

Views: 627

Answers (1)

user7823505
user7823505

Reputation:

Downloading a blob is not support on Mac and Windows. Something you can do is call the OpenBrowser window API in Windows. And provide a download link from that window. This call is coming to Mac, but is not available yet. Full documentation for this function will be provided soon. It is currently available on Win32 Outlook C2R versions (i.e. the subscription), and Win32 Outlook 2019. (Mac api is coming soon) It is not available on OWA.

Sample syntax:

Office.context.ui.openBrowserWindow("https://www.msn.com");

Upvotes: 0

Related Questions