Iterating Outlook Contacts |
| . . posted at 04-Oct-06 05:02 |
Hi there!, I have this very strange problem:
I want to iterate through Outlook contacts located in a public folder, but iteration stops randomly giving different error codes, among them these ones: -833601531, -695189499, -625983483, -37732347. Everytime I get the same text message: "The operation failed".
for (int i = 1; i <= mexicoContacts.Items.Count; i++) {
if (mexicoContacts.Items[i] is Outlook.ContactItem) {
Outlook.ContactItem contact = (Outlook.ContactItem)mexicoContacts.Items[i]; if (contact.LastName != null) listBox1.Items.Add(contact.LastName);
}
}
Any Ideas?
Thanks... |
|