【问题标题】:How to programmatically get a contact's picture in Outlook 2010?如何以编程方式在 Outlook 2010 中获取联系人的图片?
【发布时间】:2011-06-22 15:41:05
【问题描述】:

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

谢谢!

【问题讨论】:

    标签: c# .net outlook outlook-addin outlook-2010


    【解决方案1】:

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

    Attachment.GetTemporaryFilePath Method (Outlook)

    Attachment.SaveAsFile Method (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);
    

    【讨论】:

      猜你喜欢
      • 2012-08-28
      • 1970-01-01
      • 1970-01-01
      • 2016-05-28
      • 1970-01-01
      • 2014-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多