AllFiles Property
Returns a WebFiles collection that represents all files in the specified Web site.
expression.AllFiles
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The WebFiles collection returns all files in the collection regardless of their position in the Web site hierarchy.
Example
The following example searches through the files in the active Web site for a page with the title "Main Page." If the page is found, it is opened in Microsoft FrontPage.
Sub FindFileTitle()
'Returns a collection of all files in the current Web site.
Dim objApp As FrontPage.Application
Dim objWebFile As WebFile
Dim objWebFiles As WebFiles
Set objApp = FrontPage.Application
'Create a reference to the WebFiles collection.
Set objWebFiles = objApp.ActiveWeb.AllFiles
'Check each file in the collection for the title Main Page.
For Each objWebFile In objWebFiles
'If the title is found open the page in the editor.
If objWebFile.Title = "Main Page" Then
objWebFile.Open
End If
'If not found, check next file.
Next objWebFile
End Sub