WebNavigationBarSet.Links property (Publisher)

Returns a WebNavigationBarHyperlinks collection containing all of the hyperlinks in the specified web navigation bar set. Read/write.

Syntax

expression.Links

expression A variable that represents a WebNavigationBarSet object.

Return value

WebNavigationBarHyperlinks

Example

This example returns the web navigation bar hyperlinks of the first web navigation bar set of the active document.

ActiveDocument.WebNavigationBarSets(1).Links

The following example adds a new web navigation bar set to the active document, adds a hyperlink to the navigation bar, and then adds the navigation bar to every page of the publication that has the AddHyperlinkToWebNavBar parameter (Pages.Add method) set to True or the WebPageOptions.IncludePageOnNewWebNavigationBars property set to True.

With ActiveDocument.WebNavigationBarSets.AddSet(Name:="WebNavigationBarSet1") 
 With .Links 
 .Add Address:="www.microsoft.com", TextToDisplay:="Microsoft", Index:=1 
 End With 
 .AddToEveryPage Left:=10, Top:=10 
End With

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.