AnswerWizard Object

                  Properties         Methods        

AnswerWizard collection (AnswerWizardFiles object)

Represents the Answer Wizard in a Microsoft Office application. There’s only one Answer Wizard per application, and all changes to the AnswerWizard or the AnswerWizardFiles collection affect the active Office application immediately.

Using the AnswerWizard Object

Use the ClearFileList method to remove all entries from the list of files available to the current Answer Wizard. Using this method ensures that the default files available to the Office host application are no longer accessible through the Answer Wizard, such as when you’re replacing the Answer Wizard files with custom .AW files. The following example clears the file list for the default Answer Wizard and then adds two files to the custom Answer Wizard.

customAnswerWizard.ClearFileList
customAnswerWizard.Files.Add ("c:\awfiles\custom_1.aw")
customAnswerWizard.Files.Add ("c:\awfiles\custom_2.aw")

Use the ResetFileList method to restore the list of files for the current Answer Wizard to the default list of files for the Office host application. You can also establish a custom default file list in the Windows registry by adding the names of the custom files to the appropriate registry key; the files specified in that registry key will then be restored when ResetFileList is called. This example resets the file list for the current Answer Wizard.

customAnswerWizard.ResetFileList

Use the Files property to get the collection of Answer Wizard file references. The Files property returns a collection of strings that refer to .AW files. The following example returns the AnswerWizardFiles collection and displays the file count in a message box.

Dim customAnswerWizardFiles As AnswerWizardFiles
Set customAnswerWizardFiles = Application.AnswerWizard.Files

MsgBox customAnswerWizardFiles.Count