8

如何从 Outlook 中获取联系人的图片并将其保存到文件中?

谢谢!

4

1 回答 1

0

这里的其他答案很好,但还有另一种选择:

Attachment.GetTemporaryFilePath 方法 (Outlook)

Attachment.SaveAsFile 方法 (Outlook)

检索路径。

var attachment = contact.Attachments["ContactPicture.jpg"] as Attachment;
var path = attachment.GetTemporaryFilePath();

保存文件。

var attachment = contact.Attachments["ContactPicture.jpg"] as Attachment;
var path = attachment.SaveAsFile(savePath);
于 2016-03-09T22:21:27.587 回答