• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

VBA Versus VBS

Outlook 2000, like earlier versions of Outlook, supports VBS for creating code behind forms, as described in Chapter 42, "Enhancing Outlook Forms with Visual Basic Script Code." However, in addition to VBS, Outlook now hosts real Visual Basic for Applications (VBA) for creating application-wide code—a significant advance in functionality for Outlook developers. You can write macros (procedures) in VBA, using application-wide events such as the NewMail event, which lets you control Outlook without having to attach code to a specific form. Additionally (a long-awaited feature!), you can write code for custom toolbar buttons. Office standard UserForms (new to Outlook 2000, though you may know them from Word 97) are handy for creating enhanced dialog boxes for running VBA code.

The VBA dialect of Visual Basic is considerably more powerful than the VBS dialect, which is used to create code behind forms in Outlook. The main differences between the dialects are listed in Table 43.1.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint