Chapter 7. Outlook Code Basics

Get ready to dig into coding. This chapter and the others that follow in this part of the book will cover the basics of writing VBA and VBScript programming code in Outlook 2007. The highlights of this chapter include discussions of the following:

  • What triggers program code to execute

  • When to use a function instead of a subroutine

  • How to run an VBA subroutine from a toolbar button

  • How to run an VBA subroutine from a rule

  • What user interaction can cause code to run on an Outlook custom form

  • What syntax to use to refer to Outlook properties and form controls

  • How to invoke Outlook objects from other environments, such as VBA in Word

Understanding when VBA code runs

Outlook VBA supports five types of procedures:

  • Macros that you ...

Get Microsoft Outlook 2007 Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.