Creates a new reference to an Answer Wizard file and adds it to the AnswerWizardFiles collection.

Note
The Microsoft Office Assistant and AnswerWizard have been depreciated in the release of the Microsoft Office system.

Syntax

expression.Add(FileName)

expression Required. A variable that represents an object.

Parameters

Name Required/Optional Data Type Description
FileName Required String The fully qualified path to the specified Answer Wizard file.

Example

This example prepares the Answer Wizard to accept a custom file list and adds two custom Answer Wizard files. First, the example clears the file list, and then it adds two custom Answer Wizard files and checks the file count and the file names to ensure that the files were added correctly.

Visual Basic for Applications
Dim customAnswerWizard As AnswerWizard Set customAnswerWizard = Application.AnswerWizard customAnswerWizard.ClearFileList customAnswerWizard.Files.Add ("c:\awfiles\custom_1.aw") customAnswerWizard.Files.Add ("c:\awfiles\custom_2.aw") If customAnswerWizard.Files.Count = 2 Then MsgBox "Files " & customAnswerWizard.Files.Item(1) & _ " and " & customAnswerWizard.Files(2) & _ " were added sucessfully." End If

See also: