Shape.WebNavigationBarSetName property (Publisher)

Returns a String that represents the name of the web navigation bar set that the specified shape is an instance of. Read-only.

Syntax

expression.WebNavigationBarSetName

expression A variable that represents a Shape object.

Return value

String

Remarks

This property is only accessible for shapes that represent an instance of a web navigation bar set. Use the Type property to determine if a shape represents an instance of a web navigation bar set.

Use the WebNavigationBarSetName property to return the name of a WebNavigationBarSet object. Multiple pages in a web publication can each have a shape representing an instance of the same web navigation bar set. Changes made to a WebNavigationBarSet object are reflected in all the shapes representing instances of that web navigation bar set.

Example

The following example tests to determine which shapes on the first page of the active document represent instances of web navigation bars. For each such shape found, the web navigation bar that it represents an instance of is set to auto update (see also the PbShapeType enumeration).

Sub SetWebBarsToAutoUpdate() 
 
Dim shpLoop As Shape 
Dim strWebNavBarName As String 
 
For Each shpLoop In ActiveDocument.Pages(1).Shapes 
 If shpLoop.Type = pbWebNavigationBar Then 
 
 strWebNavBarName = shpLoop.WebNavigationBarSetName 
 With ActiveDocument.WebNavigationBarSets(strWebNavBarName) 
 .AutoUpdate = True 
 End With 
 
 End If 
Next 
 
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.