Shapes.AddWebNavigationBar method (Publisher)
Adds a Shape object of type pbWebNavigationBar (PbShapeType enumeration) to the current page of a publication.
Syntax
expression.AddWebNavigationBar (Name, Left, Top, Width)
expression A variable that represents a Shapes object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | String | The name of the WebNavigationBarSet object to add to the specified Shape. |
Left | Required | Variant | The position of the left edge of the shape that represents the web navigation bar set. |
Top | Required | Variant | The position of the top edge of the shape that represents the web navigation bar set. |
Width | Optional | Variant | The width of the shape that represents the web navigation bar set. |
Return value
Shape
Remarks
The AddWebNavigationBar method does not create a web navigation bar set. It adds an existing set from the WebNavigationBarSets collection. Pass the name of the existing web navigation bar set as the Name parameter.
Example
The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the AddWebNavigationBar method to add a WebNavigationBarSet object to the active document.
Public Sub AddWebNavigationBarSet_Example()
Dim pubShape As Publisher.Shape
ThisDocument.WebNavigationBarSets.AddSet ("NavBar")
Set pubShape = ThisDocument.Pages(1).Shapes.AddWebNavigationBar("NavBar", 10, 25)
End Sub
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for