WebNavigationBarHyperlinks object (Publisher)
Represents a collection of all the Hyperlink objects of the specified WebNavigationBarSet object.
Remarks
Use the Links property of the WebNavigationBarSet object to return a WebNavigationBarHyperlinks object.
Use the Count property to return a Long representing the number of hyperlinks in the WebNavigationBarHyperlinks collection of the specified WebNavigationBarSet object.
Use Item (index), where index is the index number, to return a specific Hyperlink object from the collection.
Example
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"
The following example displays the number of hyperlinks in the first WebNavigationBarSet of the active document.
MsgBox ActiveDocument.WebNavigationBarSets(1).Links.Count
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
Methods
Properties
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.