FileStream as Outlook attachment

Add-in Express™ Support Service
That's what is more important than anything else

FileStream as Outlook attachment
IT Support

Posts: 12
Joined: 2016-08-19

Going through the post on Outlook email attachments, I tried attaching an image from a url which worked.

The var fullFilePath had the path to the image.
attachments.Add(fullFilePath, OutlookApp.OlAttachmentType.olByValue);

Now, my requirement is to attach a file in the form of a FileStream to the outlook attachments method.
A way to go about it was to convert it to a temporary file on my C: drive or any other temporary location but I wanted to know is there a way to bypass it & directly attach the filestream to the attachments method without savign anywhere? Can you provide a code snippet for the same?

Thank you
Posted 13 Apr, 2017 08:48:24 Top
Andrei Smolin

Add-in Express team

Posts: 14705
Joined: 2006-05-11

The Outlook object model doesn't let you achieve this.

Check what Dmitry Streblechenko - the author of Outlook Spy and Outlook Redemption - said at and

Hope these help.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Apr, 2017 09:02:16 Top