Hi All,

Please let me know the correct group if this is in the wrong place.

I am trying to delete all Outlook contacts in a folder.

For some reason, the following code deletes exactly half of the contacts in
the folder. Can someone see what I'm doing incorrectly?


OutLook._Application outlookObj = new OutLook.Application();
OutLook.MAPIFolder fldContacts =
(OutLook.MAPIFolder)outlookObj.Session.GetDefaultFolder(OutLook.OlDefaultFolders.olFolderContacts);

foreach (Microsoft.Office.Interop.Outlook._ContactItem contactItem in
fldContacts.Items)
{
contactItem.Delete();
}