Microsoft Office 2000/Visual Basic Programmer's Guide |
Word includes several wizards that are installed optionally; the Letter Wizard, the Memo Wizard, and the Résumé Wizard are a few examples. These files have the extension .wiz, but they are Word templates, so you can open them in Word and view their VBA projects. They're located in the C:\Program Files\Microsoft Office\Templates\1033 folder.
To create an application-specific wizard for Word, first create a Word template that contains any boilerplate text, plus the wizard forms and code. The wizard should include code that displays a form as soon as the user launches the wizard.
Next, determine how users will launch the wizard. If they will launch the wizard from a command bar control, you can add the control programmatically from code running in a Word add-in.
To design a wizard that is launched from a command bar control
If the user will launch the wizard by creating a new document, you don't need a command bar control or the AutoExec or AutoExit procedures.
To design a wizard that is launched by creating a new document
When users create a new document by clicking New on the File menu, they'll see your wizard displayed in the New dialog box. Clicking the wizard and then clicking OK creates a new document and runs the Document_New event procedure, which displays the wizard's starting form.