Hi,
Yes i have done this type project last year
here my code to that.
Methods
public static string
GetContactPicturePath(Microsoft.Office.Interop.Outlook.ContactItem contact)
{
return
GetContactPicturePath(contact, System.IO.Path.GetTempPath());
}
public static string
GetContactPicturePath(Microsoft.Office.Interop.Outlook.ContactItem contact, string
path)
{
string
picturePath = "";
if
(contact.HasPicture)
{
foreach
(Microsoft.Office.Interop.Outlook.Attachment att in
contact.Attachments)
{
if
(att.DisplayName == "ContactPicture.jpg")
{
try
{
picturePath = System.IO.Path.GetDirectoryName(path) + "\\Contact_"
+ contact.EntryID
+ ".jpg";
if (!System.IO.File.Exists(picturePath))
att.SaveAsFile(picturePath);
}
catch
{
picturePath = "";
}
}
}
}
return
picturePath;
}
How to use this code
You just loop the every contact object and the do this
Microsoft.Office.Interop.Outlook.ContactItem
contact = (Microsoft.Office.Interop.Outlook.ContactItem)value;
string picturePath =
OutlookProvider.GetContactPicturePath(contact);
if its help please make it answer
Thank you