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

Use the Links property to return a WebNavigationBarHyperlinks property. 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 property set to True or the Page.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.