我正在尝试获取联系人的头像。
using Microsoft.Office.Interop.Outlook;
public sealed class OutlookAvatarFetcher
{
private static void FetchAvatars()
{
var outlook = new Application();
var folder = outlook.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderContacts);
var items = folder.Items;
for (var i = 0; i < items.Count; ++i)
{
var contact = items[i + 1] as ContactItem;
if (contact == null)
continue;
if (contact.HasPicture)
{
// TODO store the picture somehow.
}
}
}
}
但不幸的是我找不到图片访问器。