Chapter 18. Working with VBA

In previous chapters, you’ve seen how Outlook’s look, feel, and general operations can be customized to suit your own style. This capability is a powerful, and often frustrating, aspect of using this application. But you’re not limited to tweaking what you see in menus and toolbars. You have the ability to enhance and extend the capabilities of Outlook.

We can push back the boundaries of Outlook’s features by writing custom code. This can be code that reacts to button clicks and other events (such as email being sent or received), and then performs custom actions. We can also automate tedious tasks by writing macros, pieces of code that act as a script for Outlook to perform.

You can extend Outlook in three ways: by writing COM (Component Object Model ) Add-Ins, by using VBScript to react to form events, or by writing VBA (Visual Basic for Applications) code. Of these choices, VBA code provides the best balance of robustness and ease of use.

Get Outlook 2000 in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.