开发者

How to programmatically get a contact's picture in Outlook 2010?

开发者 https://www.devze.com 2023-02-09 04:20 出处:网络
How can you get a contact\'s picture from Outlook and save开发者_如何学JAVA it to a file? Thanks!The other answers here are good, but there\'s also an alternative:

How can you get a contact's picture from Outlook and save开发者_如何学JAVA it to a file?

Thanks!


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消