Hidden Messages

MAPI folders are considered to have two areas for storing message objects: the standard part and the associated part. The standard part includes messages and folders that are manipulated by the average user. These are the messages and folders that we have been working with so far in this book. The associated part is for storing additional information that is not directly manipulated by the user, such as form definitions, views, rules, reply templates, and more. It is up to the individual messaging client to decide what it will store in hidden messages, and how it will be formatted.

In CDO, associated messages are accessed through a Folder object’s HiddenMessages property. The HiddenMessages property returns a Messages collection object that in turn contains Message objects representing associated messages. Example 7-2 shows two utility subroutines that together show any associated messages currently in the user’s default message store. The code writes its output to a text file, and then launches the Notepad program to display the output. A sample of the output is shown in Figure 7-2. The figure shows that in this user’s Calendar folder (which was created by Microsoft Outlook) there are two hidden messages. The first hidden message has a subject of “LocalFreebusy”. Further, this message has a message class of "IPM.Microsoft.ScheduleData.FreeBusy“. This is intriguing, isn’t it? It’s tempting to reverse engineer this further in an attempt to write code that modifies ...

Get CDO & MAPI Programming with Visual Basic: now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.