WebNavigationBarSet.HorizontalAlignment property (Publisher)
Sets or returns a PbWizardNavBarAlignment constant that represents the horizontal alignment of the buttons in a web navigation bar set. Read/write.
Syntax
expression.HorizontalAlignment
expression A variable that represents a WebNavigationBarSet object.
Return value
PbWizardNavBarAlignment
Remarks
This property is used to set the way that buttons are displayed in a horizontally oriented web navigation bar set. For example, a WebNavigationBarSet object containing 5 links with the HorizontalButtonCount property set to 3 and the HorizontalAlignment property set to pbnbAlignRight aligns the buttons in a grid of 3 columns and 1 row. The first 3 buttons are in the first row and the remaining 2 buttons are in the rightmost columns of the second row.
Returns "Access denied" if IsHorizontal = False for the specified WebNavigationBarSet object. Use the ChangeOrientation method to set the orientation of the web navigation bar set to horizontal first before setting the HorizontalAlignment property.
The HorizontalAlignment property value can be set to any of the PbWizardNavBarAlignment constants declared in the Microsoft Publisher type library.
Example
The following example returns the first web navigation bar set from the active document, changes the orientation to horizontal if necessary, sets the HorizontalButtonCount property to 3, and then sets the HorizontalAlignment property to pbnbAlignRight.
With ActiveDocument.WebNavigationBarSets(1)
If .IsHorizontal = False Then
.ChangeOrientation pbNavBarOrientHorizontal
End If
.HorizontalButtonCount = 3
.HorizontalAlignment = pbnbAlignRight
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.