开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜