Outlook: ReportItem vs. MailItem in Undeliverable Messages

Learn which MAPI properties on a ReportItem message contain useful information.

Sue Mosher

April 23, 2002

1 Min Read
ITPro Today logo in a gray background | ITPro Today

I want to write a program that loops through all undeliverable messages in a folder on my Exchange Server 5.5 machine, but when I try to access these items' Body property, I get an empty text string. What am I doing wrong?

Those undeliverable messages use the ReportItem object rather than a typical message's MailItem object. Although you can use the MailItem.Body property to read the content of a message, a ReportItem object never contains anything in the Body property. The body that you see in the UI is built on the fly from Messaging API (MAPI) properties on the item. To learn which MAPI properties on a ReportItem message contain useful information, consider using a tool such as Dmitry Streblechenko's OutlookSpy (http://www.dimastr.com) or Mdbvu32.exe (which you can find on the Exchange CD-ROM). If you've never worked with MAPI properties or Collaboration Data Objects (CDO) property tags, go to CDOLive (http://www.cdolive.com/cdo10.htm) for a useful primer.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like