Microsoft Office 2000/Visual Basic Programmer's Guide   

PowerPoint Wizards

PowerPoint includes the Auto Content Wizard, which automatically generates a presentation with generic content based on information that the user entered in the wizard. Unfortunately, you can't view the VBA project associated with the Auto Content Wizard, because it's saved as a PowerPoint add-in.

The presentations created by the Auto Content Wizard are based on the presentation templates included with PowerPoint. You could create a new presentation based on one of these templates and achieve the same result. Again, the advantage to using the wizard is that it enters some of the information into the presentation for you.

To create a custom PowerPoint wizard, follow the instructions for building a PowerPoint add-in described in "PowerPoint Add-ins" earlier in this chapter. Remember to save your presentation as a .ppt file in case you need to re-create the add-in.

If you want the user to be able to create a new presentation based on your wizard, copy the wizard to the C:\Windows\Application Data\Microsoft\Templates folder, or if user profiles are being used, to the C:\Windows\Profiles\UserName\Application Data\Microsoft\Templates folder, and change its extension to .pwz. When users click New on the File menu in PowerPoint, they can click your wizard in the New Presentation dialog box, and then click OK to launch the wizard and create a new presentation.