How can you get a contact image from Outlook and save it in a file?
Thanks!
This is also a good example of how to do this: http://www.scip.be/index.php?Page=ArticlesNET07
I found this link: http://www.c-sharpcorner.com/forums/ShowMessages.aspx?ThreadID=70283
The other answers here are good, but there is an alternative:
Attachment.GetTemporaryFilePath Method (Outlook)
Attachment.SaveAsFile Method (Outlook)
To get the way.
var attachment = contact.Attachments["ContactPicture.jpg"] as Attachment; var path = attachment.GetTemporaryFilePath();
To save the file.
var attachment = contact.Attachments["ContactPicture.jpg"] as Attachment; var path = attachment.SaveAsFile(savePath);