Free Outlook add-on a must in the developer's toolbox
Whether you're a Outlook development newbie or a seasoned extended MAPI whiz, this free tool shows you the nuts and bolts of MAPI and gives you access to Outlook Object Model objects.
OutlookSpy 2.15 is an application I would recommend to anyone who develops for Microsoft Outlook in any environment....
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
It's from the same people who gave you the Redemption for Outlook programming library and, most importantly, it's free.
Compatible with Outlook 97 through Outlook 2010, OutlookSpy creates a new toolbar for its functions in Outlook 2007 and creates a new ribbon in Outlook 2010. Using either the toolbar or the ribbon, you can browse Outlook and Collaboration Data Objects (CDO) object model interfaces, examine object properties and run live code on the objects via Visual Basic for Applications (VBA) or JavaScript.
OutlookSpy's Script Editor button opens a window to execute any VBScript or JavaScript code and also lets you load and save existing scripts. At the bottom of the window is a Debug.Print pane where you can view debug output. Currently, the script editor doesn't support advanced debugging features like breakpoints or watching variables, but the tool's creators are open to adding these features in the next release if users want them.
The Application button opens a window that lets you browse through all CDO object properties, events and functions that are available through Outlook's Application object interface. This window also has a script tab that allows you to run code against the _Application interface, which is the default object scope for the code editor. Similar buttons exist for the _Explorer, _Store, _Folder and _Item objects.
The IMAPISession, IAddrBook, IMsgStore, IMAPIFolder and IMessage buttons (Figure 1) allow you to browse each MAPI interface. You can retrieve a list of available properties for each interface and dump values from those properties in hex format or text. You can also edit or delete properties, save them to files and more. The Misc button reveals less common interfaces that allow you to dig deeper into the Outlook programming model.
Figure 1. The IMAPISession, IAddrBook, IMsgStore, MAPIFolder and IMessage buttons.
Note: All of the interface buttons are contextual. For example, if you select a message, the IMessage button will return properties for that message (Figure 2). If a button isn't enabled, it's because the selected object doesn't have attributes under that particular object model.
Figure 2. These are the properties of a selected message after hitting the IMessage button.
Navigating the Outlook Object Model and its associated functions can be tricky; OutlookSpy includes a set of how-tos for common usage scenarios and concepts. Among them are:
- How to compare two messages
- How to access invisible Outlook folders
- How to use OutlookSpy from an external program because its functions are exposed through a native API
ABOUT THE AUTHOR
Serdar Yegulalp has been writing about computers and information technology for more than 15 years for a variety of publications, including InformationWeek, Windows Magazine and several TechTarget sites.