When to Use VBA

Many developers ask if they can use VBA in customized Outlook forms. You can use VBA to extend the functionality of Outlook, but unfortunately you cannot use it to extend the functionality of your forms.

VBA in Forms

Saying that you cannot use VBA in your Outlook forms is a little misleading. You can, as long as your form is an Office document form. Because you can include VBA in just about any Microsoft Office document, you can expect the same when you embed the Office document into a form. The VBA is actually executed by the Office application that supports the document type. For example, if I embed an Excel spreadsheet in a form, the VBA code within the spreadsheet is actually executed by the Excel application.

To create a ...

Get Exchange & Outlook®: Constructing Collaborative Solutions 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.