Allow .msg file export through JS add-in API in Outlook-Desktop

Allow .msg file export through JS add-in API in Outlook-Desktop
1

Upvotes

Upvote

 Jun 29 2022
0 Comments 
New

I'd like to create an add-in which create a .msg file of an email and sends it to a remote server for archival purposes.
Outlook already can create .msg files through the "Save as..." dialog but this functionality is not exposed to the Office API.

I could access all relevant information through the API and create an .eml file for example (or use EWS/graph-API for that), but I'd prefer to leverage the existing outlook functionality.

 

I suggest a method "getMsgFileAsync( options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<ArrayBuffer>) => void): void" on the "Office.context.mailbox.item" object.

As far as permissions go, "ItemRead" should suffice.