WebNavigationBarHyperlinks Collection [Publisher 2003 VBA Language Reference]
WebNavigationBarSet WebNavigationBarHyperlinks Hyperlink Multiple objects |
The WebNavigationBarHyperlinks represents a collection of all the Hyperlink objects of the specified WebNavigationBarSet object.
Using the WebNavigationBarHyperlinks collection
Use the Links property of the WebNavigationBarSets collection to return a WebNavigationBarHyperlinks object. The following example adds a hyperlink to the first WebNavigationBarSet of the active document.
Dim objWebNavLinks As WebNavigationBarHyperlinks
Set objWebNavLinks = ActiveDocument.WebNavigationBarSets(1).Links
objWebNavLinks.Add Address:="www.microsoft.com", _
TextToDisplay:="Microsoft"
Use WebNavigationBarHyperlinks.Count to return a Long representing the number of hyperlinks in the WebNavigationBarHyperlinks collection of the specified WebNavigationBarSet object. The following example displays the number of hyperlinks in the first WebNavigationBarSet of the active document.
MsgBox ActiveDocument.WebNavigationBarSets(1).Links.Count
Use WebNavigationBarHyperlinks.Item(index), where index is the index number, to return a specific Hyperlink object from the collection. This example displays the displayed text of the first item in the WebNavigationBarHyperlinks collection of the first WebNavigationBarSet of the active document.
MsgBox ActiveDocument.WebNavigationBarSets(1).Links.Item(1).TextToDisplay
Properties | Application Property | Count Property | Parent Property
Methods | Add Method | Item Method
Parent Objects | WebNavigationBarSet