Writing Word Macros (Paperback)
Many Microsoft Word users and VBA programmers don't realize the extensive opportunities that exist when Word's Object Model is accessed using Visual Basic for Applications (VBA), which replaced WordBasic in conjunction with the release of Word 97. By creating what is commonly called a Word Macro you can automate many features available in Word. Writing Word Macros (previously titled Learning Word Programming is the introduction to Word VBA that allows you to do these things and more, including:
- Create custom pop-up menus
- Automatically create tables from lists
- Append one document to the end (or beginning) of another
- Create a toggle switch to change a document from draft to final copy by adding or removing a watermark in the header
- Generate reports using data from other applications
- The Visual Basic Editor and the Word VBA programming environment. Word features a complete and very powerful integrated development environment for writing, running, testing, and debugging VBA macros.
- The VBA programming language (which is the same programming language used by Microsoft Excel, Access, and PowerPoint, as well as the retail editions of Visual Basic).
- The Word object model. Word exposes nearly all of its functionality through its object model, which allows Word to be controlled programmatically using VBA. While the Word object model, with almost 200 objects, is the largest among the Office applications, readers need be familiar with only a handful of objects. Writing Word Macros focuses on these essential objects, but includes a discussion of a great many more objects as well.