Tips on How to Learn WordBasic

Here are some suggestions for getting the most from the time you spend learning WordBasic.

Learn Word first

The more you know about Word, the better prepared you will be to venture into WordBasic. Most macros perform a sequence of actions in Word, and most instructions in a macro are equivalent to commands or actions in Word. So working with WordBasic is a little like working with Word without a user interface; instead of commands and dialog boxes, you use WordBasic instructions. The statements and functions you use to write instructions are much easier to understand if you're familiar with the features of Word they represent.

Also, if you know Word well, you can better answer the question you're likely to ask when writing a macro: "What's the best way to do this?" People have been known to write long macros for tasks that could be handled by a single Word command.

Learn what you need

Learn what you need for the task at hand. WordBasic can seem overwhelming
at first, particularly if you haven't had experience with a macro programming language. A great way to learn the language is to investigate how to implement a particular macro idea you have. As you gain experience writing different types of macros, you'll cover a lot of ground.

Use the macro recorder

The macro recorder can record the WordBasic instruction for virtually every action you take in Word. You can use the macro recorder to see how actions in Word translate into WordBasic instructions, and vice versa. Also, you'll find recording part of a macro is often faster and easier than writing out the instructions.

Use Help

Help is a powerful tool for learning WordBasic. In a macro-editing window,
you can type a WordBasic instruction and press F1 (Windows), or HELP or COMMAND+/ (Macintosh), to immediately display the Help topic for that statement or function. The Help topic for most statements and functions includes an example you can copy and paste into your macro.

Read the first four chapters

After reading the first four chapters of "Learning WordBasic," you'll have a
solid base from which to launch your macro explorations. The other chapters in "Learning WordBasic" provide information about WordBasic capabilities or techniques you may need for a particular application.