You are visitor number since 28 April 2001.
Go to Howard Kaikow's home page
Copyright © 1999-2004 by Howard Kaikow. All rights
reserved.
Date: 10 November 2003
From: Howard Kaikow <kaikow@standards.com>
Subject: Word VBA books
The books listed below may be useful if you need to write macros for Microsoft Word using VBA (Visual Basic for Applications). Since VBA, within each version of Office, is sort of the same for all of the Office components, it may also be useful to look at some VBA books for Access, Excel or Outlook. Also see WordBasic books. I do not list any books that I do not personally own, even if I have seen them.
In some cases, there may be a more recent edition of a listed book. The more recent edition may include corrections, or changes incorporated in a newer version of Word VBA. Since I have decided not to list a book unless I own a copy, you'll have to check for updates yourself.
If you have previously written macros using WordBasic, VBA has a useful Help topic, Visual Basic Equivalents for WordBasic Commands, that will help you understand which VBA methods/objects/properties correspond to WordBasic statements.
The following book can be useful in learning how to do something in WordBasic and then using the Visual Basic Equivalents for WordBasic Commands Help topic to learn which VBA statements correspond to particular WordBasic statement. This is useful even if you have never done any WordBasic programming.
WDK: The 3rd edition of the Microsoft Word Developer's Kit from Microsoft Press (ISBN: 1-55615-880-7). This book is out of print, but you might find a used copy.
Microsoft has made the WordBasic Help file available. This is just a regurgitation of the online Help found in non-VBA versions of Word. Although the WDK is largely a regurgitation of the same Help files, the WDK does offer a few useful additional chapters and a better index.
Starting with Office 97 and Office 98, VBA (Visual Basic for Applications) has been the macro programming language for Word. WordBasic is not supported in the VBA versions of Word, other by using the WordBasic object in VBA.
You may view VBA as being a core set of capabilities from the full Visual Basic product, plus VBA enhancements to support an application specific object model for each component of Office supporting VBA.
VBA 5 is based on Visual Basic 5. VBA in Office 97 is not identical with VBA in Word for the Macintosh.
Books listed for VBA 6 versions of Office may be used with VBA 5 versions of Office
MacroHandbook8: The Word 97 Macro & VBA Handbook by Guy Hart-Davis (ISBN: 0-7821-1962-X) is well written and covers the basics, no pun intended, but does not go very deeply into any topic.
LWP: Learning Word Programming by Steven Roman (ISBN: 1-56592-524-6) goes deeper into things than the Macro & VBA Handbook and is, in my opinion, the most bang for the buck of the Word VBA 5 based books. There is a slightly revised edition that covers Word VBA 6 as well as Word VBA 5.
StepByStep8: Microsoft Word 97 Visual Basic Step by Step by Michael Halvorson and Chris Kinata (ISBN: 1-57231-388-9). I usually avoid any "step by step" type book. I like to start with more advanced books that may also be used as a reference. It did not take me long to go through this book. For a true beginner, this book is worth reading. If you already have some programming experience, you may still find some useful examples.
OPG8: Microsoft Office 97 Visual Basic Programmer's Guide (ISBN: 1-57231-340-4). Contains info not found in the other books listed.
Word97Annoyances: Word 97 Annoyances by Woody Leonhard, Lee Hudspeth and T.J. Lee (ISBN: 1-56592-308-1) is very much along the lines of TUGWORD (see Word 6/7 macros: WordBasic books). Some people should read it before reading the books I list.. It all depends on your background, but I feel that the book is useful for all.
VBA 6 is based on Visual Basic 6. VBA 6 is not used in Word for Macintosh. VBA 6 has significant enhancements over VBA 5, so one must take care if trying to write cross-platform or cross-version Word VBA macros.
WME: Writing Word Macros by Steven Roman (ISBN: 1-56592-725-7) is a minor revision of LWP to include Word 2000. In my opinion, WME offers the most bang for the buck of the Word VBA 6 based books..
OPG9: Microsoft Office 2000 Visual Basic Programmer's Guide (ISBN: My copy came with the Office Developer Edition software, so it does not have an ISBN). Contains info not found in the other books listed. A big improvement over the Office 97 edition.
WroxWord2000VBA: Word 2000 VBA Programmer's Reference by Duncan Mackenzie and Felipe Martins (ISBN: 1-861002-55-6) is part of a set of 3 books from Wrox Press. The other two are Excel 2000 VBA Programmer's Reference by John Green, Stephen Bullen and Felipe Martins (ISBN 1-861002-54-8) and Outlook 2000 VBA Programmer's Reference by Dwayne Gifford (ISBN: 1-861002-53-X). All 3 books are available for purchase individually and as a set (ISBN: 1-861003-00-5).
I purchased the set and have read the Word 2000 VBA book. I have not yet read the other two.
The following are comments on the Word VBA book:
Chapters 1-5 of the "book provides a general introduction to VBA programming and the features of Word 2000. It is designed to be read as a whole and in sequence.".
This part is very light in content.
In chapters 6-10, "standalone projects show various techniques used in Word development. Each chapter includes one or more projects and, although a project may touch on a topic covered in another chapter, the chapters can be read individually and out of sequence.".
These chapters describe some useful projects and useful coding techniques, although the book does not go into them very deeply. The projects are built up step by step and should be a good learning experience. These chapters might justify the purchase of the book, otherwise, I would look elsewhere.
The first 10 chapters use the first 284 pages of the book. The remaining, approximately 350, pages include "a detailed description of the Word 2000 object model, a VBA reference section (covering the objects, properties and methods, as well as functions and statements), a summary of the ADO (ActiveX Data Objects) object model and a brief introduction to programming the Office Assistant.".
I found Appendix D (Programming with the Office Assistant) to be very useful. However, I was very disappointed with the rest of the Appendices.
I was hoping that the "VBA Reference section" would be useful as a reference. In my opinion, it is useful for getting a feel for what methods/properties are associated with a particular object, if you know what to look for, but it omits too many details to otherwise be useful as a reference.
The index leaves a lot to be desired. Most importantly, without a good index, the "VBA Reference section" is, at best, difficult to use and not very useful.
One reason to purchase the 3 volume set is that the other volumes, in particular the Excel 2000 VBA volume, cover material that was entirely omitted or glossed over in the Word 200 VBA volume. For example, remembering that I have not yet read the Excel 2000 VBA volume, the Excel 2000 VBA volume includes:
A few pages on "Run Time Error Handling". My recollection is that the Word VBA book covers this only en passant in one example.
Coverage of Command Bars and ClassModules.
Coverage of Programming the VBE.
More extensive coverage of Programming with the Windows API.
VBA 6.3 is used in Office XP. VBA 6.3 is not used in Word for Macintosh. VBA 6.3 has some enhancements over VBA 6, so one must take care if trying to write cross-platform or cross-version Word VBA macros.
I have not seen any need to purchase a Word 2002 VBA book. However, I have purchased VBA books for some other Office XP applications, e.g., Excel 2002 and Outlook 2002, which do cover some of the changes in VBA 6.3.
VBA 6.3 is also used in Office 2003. VBA 6.3 is not used in Word for Macintosh. VBA 6.3 has some enhancements over VBA 6, so one must take care if trying to write cross-platform or cross-version Word VBA macros.
I am waiting to see if any Office 2003 VBA books are released that will be worth purchasing, given all the other books I already have.
In order to learn more about (Word) VBA, one also has to read some books that are oriented towards Visual Basic or VBA, in general, not Word in particular.
For starters, I would recommend the VBA Developer's Handbook by Ken Getz and Mike Gilbert. ISBN 0-7821-1951-4 is based on Office 97. ISBN 0-7821-2978-1 is based on Office 2000 and Office XP.
The following books are useful for learning Visual Basic, which should make it easier for you to understand and use VBA:
VB6GroundUp: While lurking in the VB related newsgroups, I saw a few recommendations for Gary Cornell's Visual Basic 6 from the Ground Up (ISBN: 0-07-882508-3). I went to the local bookstores to look it over. It looked well organized so I bought it. I believe that it would be a good choice both to learn from and as a reference.
VB&VBA: Another often recommended book is VB & VBA IN A NUTSHELL (ISBN: 1-56592-358-8) by Paul Lomax. Like the other Nutshell books from O'Reilly, this is largely a reference book. The first 107 pages do give a brief introduction to VB. Note that I find the use of VBA in the book's title to be misleading. In the sense of Office VBA, it is not a VBA book, it is really a VB book.
The above is more than enough to get someone started with Word VBA macros. A word, no pun intended, of advice: VBA is far superior to WordBasic, but is also much more difficult to use, even more so, due to the inadequate documentation from Microsoft. Fortunately, there are a number of 3rd party books, but to do it right, you need quite a few books.