News & Views Microsoft Word Developer’s Kit
News & Views Book Review


Microsoft Word Developer’s Kit

by David Downing, Technical Writer
USERS Incorporated (Valley Forge, PA)

Microsoft Word Developer's Kit, 3rd Ed., Microsoft Press, 1995. ISBN 1-55615-880-7. $49.95. 1097 pp.

Originally published in News & Views March 1997 issue.

Copyright 1997 STC-Philadelphia Metro Chapter. For permission to reprint this article, contact the Managing Editor.


A powerful feature of Microsoft Word is the ability to create custom commands, or macros. The simplest macros are sequences of Word operations you record, then treat as a single command. These macros let you perform tedious, multi-step tasks with one keystroke, menu command, or toolbar button.

Why go beyond recording?
When you record macros, you have to settle for tasks you could perform with Word commands. If you make a mistake or want to change one step, you have to record the whole macro all over again.

And recorded macros can be dangerous because they always perform exactly the same actions. I made a macro to find and delete the next hard page break, which did awful things if there wasn’t a hard page break between the cursor and the end of the document. If the macro includes dialog boxes, all the settings get recorded, not just the ones you changed. I recorded macros to change the button size, and found they were displaying and hiding toolbars on me.

To solve these problems, you need to edit and write macros, using the macro editor and the programming language WordBasic. You can learn how with the Microsoft Word Developer’s Kit.

Written for all Word users
You can use the Microsoft Word Developer’s Kit whether you're ignorant of programming or a seasoned WordBasic user, because the book is divided into sections aimed at users with differing levels of expertise. Crossplatform differences are discussed throughout the book, which comes with both Mac and PC diskettes.

Effective teaching method
The 250-page, "Learning WordBasic," uses realistic examples, and a strategy I wish every teacher would adopt: it demonstrates the need to know something before teaching it to you. For example, the limitations and dangers of recorded macros are demonstrated before editing and writing are introduced. Later, the book presents programs that are easy to understand but clumsy, such as one that says "1 times," instead of "once," then shows you how to refine them.

Unfortunately, dialog boxes aren’t taught with the same care as everything else. For example, you’re shown how to create dialog records, which store the setting of a dialog box, but never given an overall rule for when you need to use dialog records and when you can refer to the dialog boxes directly. The section on custom dialog boxes uses an unrealistic example to show every feature in the smallest possible space.

If you want to write macros that other people can use (and might even want to buy), you’ll find discussions of how to

  • protect other users from dangers you’re aware of, but they may not be (such as a macro ending with an error message if the user clicks the Cancel button at the wrong time)
  • be sure a macro leaves everything as it was before the user ran it (for example, restoring any dialog box settings it changed)
  • copy and distribute macros
  • protect macros from being changed by other users.
A superior reference tool
The reference section includes the expected alphabetical list of WordBasic commands, plus a list of commands organized by function, and a list of differences across versions of WordBasic. The main alphabetical list includes extensive cross-references to help you look up all related entries. Most entries have either an example or a reference to one.

For the advanced user
The appendixes deal with advanced topics, such as interfacing a macro with an application outside of Word. They also provide technical details, such as operating limits for WordBasic and Word itself.

If you want to get the maximum use out of Word, I recommend investing in the Microsoft Word Developer’s Kit.


Return to . . .

[News & Views] [STC-PMC Home] [STC Home Page]
Last updated: March 22, 1997 (rst)