Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers

Get ready to dig into coding. In this chapter and the others that follow in this section, you will learn the basics of writing VBA programming code in Microsoft Outlook. Most of the techniques will also be applicable to VBScript code behind Outlook forms.
The highlights of this chapter include discussions of the following:
What triggers program routines to execute
When to use a function versus a subroutine
How to run an Outlook subroutine from a toolbar button
In Outlook 2002, how to run an Outlook subroutine from a Rules Wizard rule
Think about the Windows applications you use every day. If you have a money-management program, take that as an example. When you start the program, it probably pops up reminders that you have bills to pay or investments to check on. You click a button or maybe a menu command to enter a new transaction. Perhaps you can type "May 15," and the program converts it to May 15, 2003 (or whatever the current year might be). Although virtually all of the program runs out of sight, it depends on you, the user, for the key interactions that tell it what to do.
Each time you interact with the program choosing a menu item,...