问题
How can you get a contact's picture from Outlook and save it to a file?
Thanks!
回答1:
The other answers here are good, but there's also an alternative:
Attachment.GetTemporaryFilePath Method (Outlook)
Attachment.SaveAsFile Method (Outlook)
To retrieve the path.
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);
来源:https://stackoverflow.com/questions/4920168/how-to-programmatically-get-a-contacts-picture-in-outlook-2010