Files property as it applies to the AnswerWizard object.
Returns an AnswerWizardFiles collection that represents the list of files available to the current AnswerWizard. Read-only.
For information about returning a single member of a collection, see Returning an Object from a Collection.
Files property as it applies to the SharedWorkspace object.
Returns a SharedWorkspaceFiles collection that represents the list of files stored in the document library associated with the current shared workspace. Read-only.
Example
As it applies to the AnswerWizard object.
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
As it applies to the SharedWorkspace object.
The following example lists the files saved in the current shared workspace.
Dim swsFiles As Office.SharedWorkspaceFiles
Set swsFiles = ActiveWorkbook.SharedWorkspace.Files
MsgBox "There are " & swsFiles.Count & _
" file(s)
vbInformation + vbOKOnly, _
"Collection Information"
Set swsFiles = Nothing