InNavBars Property

Microsoft FrontPage Visual Basic

InNavBars Property

True to specify that the current page will be visible in the Web site's link bars. Read/write Boolean.

Note  A link bar is a set of hyperlinks used for navigating a Web site.

expression.InNavBars

expression    Required. An expression that returns a NavigationNode object.

Remarks

All pages with the InNavBars property set to False will appear grayed out in Navigation view.

Example

The following example prompts the user to select which navigation nodes will appear in the link bar. If the user selects Yes, the current page will appear in the link bar. If the user selects No, the current page will not appear in the link bar and will appear grayed out in Navigation view. The user is prompted for each navigation node in the active Web site.

    Sub AllNavigationNodes()
'Return a collection of all navigation nodes used in the current web
'Allows you to select which pages will appear in the link 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 link 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