Add Method (NavigationNodes Collection) Example

This example adds a new node called footnote.htm to the list of items in the NavigationNodes collection.

Note   To run this example, you must have a web called "C:\My Documents\My Webs\Rogue Cellars" (for a server running on Microsoft Windows) or "C:\WINNT\Profiles\logon alias\Personal\My Webs\Rogue Cellars" (for a server running on Windows NT) and a FrontPage-based file called footnote.htm. Or, you may substitute an alternative web URL or file.

Private Sub AddNewNavNode()
Dim myHome As NavigationNode
Dim myNewNode As NavigationNode
Dim myFileUrl As String

myFileUrl = "C:\My Documents\My Webs\Rogue Cellars\footnote.htm"
Set myHome = ActiveWeb.HomeNavigationNode
Set myNewNode = _
    myHome.Children.Add (myFileUrl, _
    "Footnote", fpStructLeftmostChild)
ActiveWeb.ApplyNavigationStructure
End Sub