ResetFileList Method Example

This example resets the file list for the current AnswerWizard and then displays both the file count and the file names in a message box.

Dim customAnswerWizard As AnswerWizard
Dim strFileList As String
Dim intCounter As Integer
Dim intNumFiles As Integer


Set customAnswerWizard = Application.AnswerWizard
intCounter = 1

customAnswerWizard.ResetFileList
strFileList = ""
intNumFiles = customAnswerWizard.Files.Count
For intCounter = 1 To (intNumFiles)
    strFileList = strFileList & _
    customAnswerWizard.Files.Item(intCounter) & Chr(13)
Next

MsgBox "There are " & customAnswerWizard.Files.Count & _
    " files avaialble through this AnswerWizard: " & _
    Chr(13) & strFileList