View Single Post
  #1  
Old May 20th 09, 07:22 AM posted to microsoft.public.outlook.contacts
Lokanath Chhatria
external usenet poster
 
Posts: 1
Default Synchronizing sharepoint contact list with outlook 2007

Hi,

i have written a vsto program to retrive the contact details from outlook
contacts.My outlook contact contains two types of contact.
1)contacts which are creatred in outlook iteslf.
2)contacts which are synchonized from sharepoint contact list.

while retrieving contact details,the outlook contact is only retrieved but
not the synchonized sharepoint contacts.Below is code snippet:

private void ThisApplication_Startup(object sender, System.EventArgs e)
{
Outlook.NameSpace outlookNameSpace = this.GetNamespace("MAPI");
Outlook.MAPIFolder contactsFolder =
outlookNameSpace.GetDefaultFolder(Microsoft.Office .Interop.Outlook.OlDefaultFolders.olFolderContacts );
Outlook.Items contactItems = contactsFolder.Items;
foreach(Outlook.ContactItem contact in contactItems)
{
MessageBox.Show("Contact First Name:"+ contact.FirstName +
"Contact Last Name:" + contact.LastName);]
}

}
I am using VSTO second edition 2005,visual studio 2005 and outlook 2007.

I want to know why sharepoint list contact is not retrieved or my program is
wrong.



Ads