Outlook Contact address display

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
 
D

Daniel

Learn how to do this yourself, dont spam people! (please check all other
posts from Kanan regardin this, they all indicate stealing the contact list
covertly from outlook)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top