WebNavigationBarSet.IsHorizontal property (Publisher)

True if the specified WebNavigationBarSet has a horizontal orientation. Read-only Boolean.

Syntax

expression.IsHorizontal

expression A variable that represents a WebNavigationBarSet object.

Return value

Boolean

Remarks

This property is used to determine the orientation of the navigation bar set prior to setting certain properties that assume a horizontal orientation such as the HorizontalAlignment property.

Example

This example adds the first navigation bar in the WebNavigationBarSets collection of the active document to each page, and then sets the button style to small.

A test is performed to determine whether the navigation bar set is horizontal. If it is not, the ChangeOrientation method is called and the orientation is set to horizontal. After the navigation bar is oriented horizontally, the horizontal button count is set to 3 and the horizontal alignment of the buttons is set to pbnbAlignLeft.

Dim objWebNav As WebNavigationBarSet 
Set objWebNav = ActiveDocument.WebNavigationBarSets(1) 
With objWebNav 
 .AddToEveryPage Left:=10, Top:=10 
 .ButtonStyle = pbnbButtonStyleSmall 
 If .IsHorizontal = False Then 
 .ChangeOrientation pbNavBarOrientHorizontal 
 End If 
 .HorizontalButtonCount = 3 
 .HorizontalAlignment = pbnbAlignLeft 
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.