Outlook: Creating a Custom Pop-Up Box
Here’s a clever way to use VBA code to help you categorize your messages.
March 26, 2002
How can I make a box pop up when I send a message so that I can set a category for the message I'm sending?
This task is easy to do with Visual Basic for Applications (VBA) code in Outlook 2002, which adds a ShowCategoriesDialog method to all Outlook items. Just put the code that Listing 1 shows in the ThisOutlookSession module in your VBA project. If you need help getting started with Outlook VBA, I've summarized the basics in my August 2001 Windows & .NET Magazine Outlook VBA on Demand column "Back to Basics" (http://www.winnetmag.com, InstantDoc ID 21522).
In Outlook 2000, the addition isn't quite so simple because messages that you create with WordMail (i.e., Microsoft Word as your email editor) act differently from those you create with the built-in Outlook editor. However, if you're using the built-in editor, use the code that Listing 2 shows, again putting it in the ThisOutlookSession module. After checking to make sure you're not using Word as the editor, you can use this procedure to locate the toolbar or menu command for the Options dialog box by its ID number, then execute it. The user sees the full Options dialog box, just as if they'd clicked the Options button on a message.
About the Author
You May Also Like