Search code examples
outlookoffice-jsoutlook-addinoffice-addinsoutlook-web-addins

How to download attachments in outlook add-ins?


Is it possible to download attachments in outlook add-ins? I mean trigger 'save as' button by javascript. now I can get attachments by using item.attachments and then get base64 with

item.getAttachmentContentAsync

by this way i can download manually. But is it possible to make something like 'save as' calling?

I need something like item.attachments[0].saveAs('directory')


Solution

  • The Office JavaScript API (OfficeJS) doesn't provide anything for triggering built-in commands or saving attachments as a user to the disk. See Get attachments of an Outlook item from the server for more information.

    You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team go through the planning process.