VBA: Object Browser

The object browser is all you need to learn the object model of Outlook.

Last modified: 2015/02/12 | Accessed: 8.275  | #35
◀ Previous article Next article ▶
Determine the "identity" of your emails. Set with SAM the sender and the folder folder for sent items with the help of rules.

The object browser is a powerful tool if you want to write your own VBA macros. Press f2 in the VBA editor, then switch in the left dropdown box from 'All Libraries' to 'Outlook'. Now you'll see all objects of the Outlook object model (OOM) left hand, and right hand you'll see the methods, properties, etc. of each object

For instance, select 'Application' left hand. The Application object is the top most object in the hierarchy of the OOM. In fact, for most if not all object models the top most object is named 'Application'. Now you can explore the functions supported by the object.

See also the area below the listboxes, where you'll find a brief explanation for many entries. If a function or property returns an object, it is highlighted green. A click on it will select the object left hand, so you can now explore what is supported by that object. This way you find with just a few clicks the informations you need to learn what type of data a property returns, or what type of object must be passed to a function.

Maybe you've read anywhere that, for instance, the 'ItemAdd' event is where you should place a given code, but you don't know that event or where to find it. Well, simply type 'itemadd' in the search box, and press Enter. The result will list the ItemAdd event as well as the object the event belongs to. Select the event and press f1 to get a code sample. For most objects, methods and properties the help file gives you a code sample.

Once you get familar to this tool, it will be much easier for you to learn the other object models of the Microsoft Office family. With a few VBA basics you'll then be able to write your own macros for any Office application.

Category-Manager Category-Manager
With Category-Manager you can group your Outlook categories, share them with other users, filter a folder by category, automatically categorize new emails, and more. You can use the Addin even for IMAP.
◀ Previous article ▲ Top Next article ▶