Returns or sets a Boolean that determines if the current page will be visible in the web's navigation bars. A navigation bar is a set of hyperlinks used for navigating a Web site. Read/write.
expression.InNavBars
expression Required. An expression that returns a NavigationNode object.
If True, the current page will appear in the navigation bar. If False, the current page will not appear in the navigation bar. All pages with the InNavBars property set to False will appear grayed out in Navigation view.
The following example prompts the user to select which navigation nodes will appear in the navigation bar. If the user selects Yes, the current page will appear in the navigation bar. If the user selects No, the current page will not appear in the navigation bar and will appear grayed out in Navigation view. The user is prompted for each navigation node in the web.
Sub AllNavigationNodes()
'Return a collection of all navigation nodes used in the current web
'Allows you to select which pages will appear in the navigation bar
Dim objApp As FrontPage.Application
Dim objNavNode As NavigationNode
Dim objNavNodes As NavigationNodes
Dim strAns As String
Set objApp = FrontPage.Application
'Create a reference to the NavigationNodes collection
Set objNavNodes = objApp.ActiveWeb.AllNavigationNodes
'For each node in the collection
For Each objNavNode In objNavNodes
'Prompt the user
strAns = MsgBox("Do you want the page " & objNavNode.Label & _
" to appear in the navigation bar?", vbYesNo)
'If user answers yes, set to True
If strAns = vbYes Then
objNavNode.InNavBars = True
Else
'If no, set to False
objNavNode.InNavBars = False
End If
'Go to next node
Next objNavNode
End Sub