4
我想獲取聯繫人的頭像圖片。如何獲取Outlook聯繫人的頭像圖片?
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.
}
}
}
}
但不幸的是我找不到圖片訪問器。
似乎我在這裏找到了答案http://www.scip.be/index.php?Page=ArticlesNET07 – 2013-05-03 12:36:01
這裏有個類似的問題 - http://www.c-sharpcorner.com/Forums/Thread/70283 / – JayH 2013-05-03 12:52:31