4

What I'm trying to do

Download a file from an Office Outlook add-in inside Outlook application in MacOS X "El Capitan" ( not the web portal )

How I tried to do it

I have tried with:

  • Blob
  • data URL
  • btoa - atob
  • A tag with download variable
  • internal window.open ( in a allowed domain )
  • Applying Office Dev tutorial Office-Add-in-JavaScript-FileDownload ( with a modification to make it work in outlook due to OfficeExtension class)

But result is always the same: or it shows the file (i.e. images or text ), or Outlook prompts a mesage about that he cannot open a blob.

The only way that works is by opening an external browser window but I want to avoid it for UX and security reasons.

Note that it works perfectly in the web portal of Outlook.

Question

Does anyone knows when this will be allowed in Outlook (as it seems it works in Word, due to the mentionned tutorial ) or if it can be done?

Thanks for the help

Jonathan Huet
  • 395
  • 1
  • 4
  • 12
  • how did u solve this? – Rajeev Aug 04 '17 at 10:06
  • I still having the same issue. I didn't retried it since I posted this question, but I will because Outlook is updated very often and I hope that MS has activated this feature. I will let you know it works :) – Jonathan Huet Aug 05 '17 at 11:02
  • I solved this problem by creating anchor event and triggering click event on anchor tag dynamically. This will open the url in browser where js function downloads the blob and saves files to local disk. i can share code if u need – Rajeev Aug 05 '17 at 11:43
  • @Rajeev Can you post your working code ?Thx. I have same issue with this. I also post on Microsoft forum but no answer there: https://social.msdn.microsoft.com/Forums/office/en-US/9b86396f-baf3-4f6e-9908-6b20ae68f3a3/download-blob-not-working-on-outlook-addin-in-mac?forum=Office365forDevelopers – OriEng Oct 08 '17 at 10:29
  • I tried in this way : https://stackoverflow.com/questions/46562117/pop-up-blocked-error-when-opening-url-from-outlook-webaddin/46569031 But is has above limitation – Rajeev Oct 08 '17 at 10:33
  • @Rajeev Thx, but I get same error... ' There is no application to set to open the URL blob:https:// ..... " . It's work for you for blob ? Thank you very much again . – OriEng Oct 08 '17 at 10:38
  • i was confused. U cannot directly save file inoutlook. u have to host some javascript function and let it download and save it. see example : https://gist.github.com/rajeevprasanna/327be60b176fa4c1129aca456d9e1d57 if u have questions, post on gist link. i will explain how i did – Rajeev Oct 08 '17 at 11:04
  • @Rajeev thanks for your help . I post my code at you gist link ,I don't know why it's not working in the way you try – OriEng Oct 08 '17 at 11:41
  • check my response : https://gist.github.com/rajeevprasanna/327be60b176fa4c1129aca456d9e1d57 – Rajeev Oct 09 '17 at 05:05
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/156247/discussion-between-orieng-and-rajeev). – OriEng Oct 09 '17 at 07:34

0 Answers0