I'm currently working on a program which checks my Outlook Profile for Mail Delivery Reports. As they are other objects than MailItems (that are ReportItems), I have a problem to list all the items in the inbox. Is there a way to filter the inbox via C# to list only the ReportItems.
For example i've this:
foreach(Outlook.ReportItem oReport in oItems)
but as soon as a MailItem occurs I'll get an error.
Well filtering is the first problem ... the other problem I have is, I've created a special Profile (Control Panel -> Mail) where I loaded another PST file with Delivery Report Mails in it. The problem I have is, how can I connect to the PST file via the Profile? Or how do I connect to another folder than the InboxFolder(Outlook.MAPIFolder oInbox = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);)