AllNavigationNodes 属性

       

返回 NavigationNodes 集合对象,该对象代表当前站点中所有导航节点的集合。导航节点用于在 Microsoft FrontPage 的“导航”视图中显示当前站点的图示。

expression.AllNavigationNodes

expression  必选。返回“应用于”列表中的对象之一的表达式。

示例

下列示例返回对 NavigationNodes 集合的引用,并显示此集合中第一个对象的文件名及其所在站点的标题。

Sub AllNavigationNodes()
'Return a collection of all navigation nodes used in the current web

    Dim objApp As FrontPage.Application
    Dim objNavNode As NavigationNode
    Dim objNavNodes As NavigationNodes

    Set objApp = FrontPage.Application
    'Create a reference to the NavigationNodes collection.
    Set objNavNodes = objApp.ActiveWeb.AllNavigationNodes
    'Return a reference to the first node in the collection.
    Set objNavNode = objNavNodes.Item(0)

    'Display the file name and the web of the first
    'navigation node in the collection
    MsgBox "The URL of this file is " & objNavNode.Url & _
            vbCr & ". It is found in the web " _
            & objNavNode.Web.Title & "."

End Sub