By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,650 Members | 753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,650 IT Pros & Developers. It's quick & easy.

Outlook Contact address display

P: n/a

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.olF olderContacts);
Outlook.Items oItems = oContacts.Items;
System.Windows.Forms.MessageBox.Show(""+oItems.Cou nt);

but I am always getting 0 when i execute this above statements. Also how to
loop through contact list. Appreciate your help...

Thanks
--
kannan
Oct 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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)

"kannan" <ka****@discussions.microsoft.comwrote in message
news:95**********************************@microsof t.com...
>
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.olF olderContacts);
Outlook.Items oItems = oContacts.Items;
System.Windows.Forms.MessageBox.Show(""+oItems.Cou nt);

but I am always getting 0 when i execute this above statements. Also how
to
loop through contact list. Appreciate your help...

Thanks
--
kannan

Oct 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.