File Property Example

This example returns the name of the File object associated with a navigation node in the active FrontPage-based web.

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