Hi all, I'm writing an add-in for Outlook to parse all mails within a folder by clicking on a custom context menu button. I've got the button hooked up, but when trying to use the foreach loop within the folder to check the mail items it only seems to check the first one.
I grab the folder details here:
void Application_FolderContextMenuDisplay(Office.CommandBar CommandBar, ***MAPIFolder Folder***)
I then pass it to a parser:
public void checkFolder(MAPIFolder folder)
{
MailParser parser = new MailParser();
foreach (MailItem item in folder.Items)
{
parser.parseMail(item);
}
}
It's the foreach here that seems to fail.
Any ideas? This is driving me nuts.