G
Guest
Hi,
I am trying to loop through outlook contact address and display in
messagebox.
I have used following code:
Outlook._Application olApp = new Outlook.ApplicationClass();
Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
Outlook.MAPIFolder oContacts =
olNs.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
Outlook.Items oItems = oContacts.Items;
System.Windows.Forms.MessageBox.Show(""+oItems.Count);
but I am always getting 0 when i execute this above statements. Also how to
loop through contact list. Appreciate your help...
Thanks
I am trying to loop through outlook contact address and display in
messagebox.
I have used following code:
Outlook._Application olApp = new Outlook.ApplicationClass();
Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
Outlook.MAPIFolder oContacts =
olNs.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
Outlook.Items oItems = oContacts.Items;
System.Windows.Forms.MessageBox.Show(""+oItems.Count);
but I am always getting 0 when i execute this above statements. Also how to
loop through contact list. Appreciate your help...
Thanks