File Property

Microsoft FrontPage Visual Basic

File Property

Returns a WebFile object that represents the Web page associated with the specified object.

expression.File

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example returns the name of the Web page associated with a navigation node in the active Web site.

    Private Sub GetFileFromNavNode()
    Dim myNavNode As NavigationNode
    Dim myNavNodes As NavigationNodes
    Dim myNavFiles As String
    Dim myNavFile As String
    On Error Resume Next
    Set myNavNodes = ActiveWeb.HomeNavigationNode.Children
    For Each myNavNode In myNavNodes
        myNavFile = myNavNode.File.Name
        If ERR <> 0 Then Exit Sub
        myNavFiles = myNavFiles & myNavFile & vbCrLf
    Next

End Sub