IN THIS CHAPTER
Office gurus know a secret that's crucial for mastering any or all of the Office applications: There are things you can make a program do that are not available via the program's interface (that is, its menu commands, toolbar buttons, and shortcut keys). To accomplish these extra tricks and techniques, you have to go under the program's hood and use Visual Basic for Applications (VBA), the programming language that comes with the Office suite. You use VBA to build small sets of instructions called scripts, or, more commonly, macros. With these instructions, you can make the program perform multiple tasks in a single operation or, as I mentioned earlier, perform tasks that aren't part of the interface. For example, in Chapter 1, "Building Dynamic Documents in Word," I showed you a simple macro that updates all the fields in a document (see Listing 1.1), a task that is otherwise cumbersome to accomplish using traditional methods. This chapter introduces you to VBA programming. You learn how to run existing macros, record program actions as a macro, and the basics of creating your own macros. Chapter 12, "Putting VBA to Good Use: Practical Macros Everyone Can Use," offers a number of macros that you can use "as is" or modify to suit your needs.
|