WebNavigationBarHyperlinks.Add method (Publisher)

Adds a new Hyperlink object to the specified WebNavigationBarHyperlinks collection and returns the new Hyperlink object.

Syntax

expression.Add (Address, RelativePage, PageID, TextToDisplay, Index)

expression A variable that represents a WebNavigationBarHyperlinks object.

Parameters

Name Required/Optional Data type Description
Address Optional String The address of the new hyperlink. If RelativePage is pbHlinkTargetTypeURL (default) or pbHlinkTargetTypeEmail, Address must be specified, or an error occurs.
RelativePage Optional PbHlinkTargetType The type of hyperlink to add. Can be one of the PbHlinkTargetType constants. The default is pbHlinkTargetTypeURL.
PageID Optional Long The page ID of the destination page for the new hyperlink. If RelativePage is pbHlinkTargetTypePageID, PageID must be specified, or an error occurs. The page ID corresponds to the PageID property of the destination page.
TextToDisplay Optional String The display text of the new hyperlink.
Index Optional Long The index of the new Hyperlink object in the WebNavigationBarHyperlinks collection.

Return value

Hyperlink

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.