Here's a problem: You're automating Outlook in your Excel code (or any Office program for that matter), and need to find the value for an Outlook constant because you know you can't use built-in Outlook constants in late-bound Excel VBA code. How do you usually do it? Do an Internet search for the number?
One shortcut I discovered recently runs as follows:
- Add the library reference in the VBA IDE (if necessary);
- Open the Object Browser (press F2);
- Find and select the name of the object library in the upper combo box;
- Type the name of the constant in the lower combo box;
- Look at the bottom of the Object Browser dialog box for the constant value.


Brilliant! I'm still amazed every day at what I learn about Excel.
Of course, you could always use the list of enumerated constants and not worry about using magic numbers in your code!
Another excellent article JP. I am impressed with the number of good posts you make each week.
The Object Browser is one of the best tools in Office that is underused. I have used the Object Browser for the reason you mentiioned quite often.
If you do not want to add a reference to Outlook you can open Outlook and then open the Outlook VBA Editor by pressing Alt + F11. Next on the Menu Bar click View, then Object Browser. The Outlook Library is already loaded and ready for you to use. This is very helpful because you can switch back and forth between the VBA Editor you are working in and Outlook's Object Browser.
Normally I would agree with you, but whenever I open the VB editor in Outlook, it pops up every time I lock and unlock my computer. In fact, every VB editor in every Office program I use does that. You have to close and restart the program to get that behavior to stop. It's a hassle because I like to keep Outlook open all day. But I open and close Excel 50-60 times a day. When you add the library reference to Excel, it's as good as the Outlook VB object browser anyway.
I have never had that problem. I will soon install Windows 7, but right now I am using XP Professional. I have Office 2003 and 2007 on my computer. Do you think that is that a bug in Vista?
Really? I've seen complaints about that specific behavior many times. See http://spreadsheetpage.com/index.php/comments/annoying_window_behavior/ for example. Try it and see if it happens for you.