Share this Page URL

Chapter 18. Working with VBA > A VBA Language Primer - Pg. 413

What Is VBA? VBA is a subset of the Visual Basic programming language. It is a hosted language component, meaning that an application provides the environment in which VBA code is written and executed. Word 2000 is one such application. Each Office application has a slightly different flavor of VBA. The basic language is the same, but is extended with extra components through the host application's object model. An object model is a hierarchy of logical entities (objects) representing components of the application, such as a document in Word or a worksheet in Excel. By using an application's object model (explained later in this chapter), you can programmatically perform standard application functions, like text formatting, as well as more complex tasks, some of which may require interaction with the user. You can even use VBA in one Office application to control another Office application using Automation code. This allows you to write programs that integrate the capa- bilities of several Office components. Some of the code samples in this chapter il- lustrate working with another application (Access or Outlook) from Word VBA code, though a full discussion of inter-Office Automation programming is beyond the scope of this book. See "Microsoft Office 2000/Visual Basic Programmer's Guide" (http://msdn.micro .htm) for more information on Visual Basic and Office 2000. This document is in- cluded in printed form in some editions of Office 2000.