TabStop.Alignment Property (Publisher)

Returns or sets a PbTabAlignmentType constant that represents the alignment for the specified tab stop. Read/write.


expression. Alignment

expression A variable that represents a TabStop object.


The Alignment property value can be one of the PbTabAlignmentType constants declared in the Microsoft Publisher type library.


This example enters a tabbed list and sets the alignment for two custom tab stops. This example assumes that the specified shape is a text frame and not another type of shape and that there are at least two custom tab stops already set.

Sub CustomDecimalTabStop() 
 With ActiveDocument.Pages(1).Shapes(1).TextFrame.TextRange 
 .InsertAfter Newtext:="Pencils" &; vbTab &; _ 
 "Each" &; vbTab &; "1.50" &; vbLf 
 .InsertAfter Newtext:="Pens" &; vbTab &; _ 
 "Each" &; vbTab &; "4.95" &; vbLf 
 .InsertAfter Newtext:="Folders" &; vbTab &; _ 
 "Box" &; vbTab &; "35.28" &; vbLf 
 .InsertAfter Newtext:="Envelopes" &; vbTab &; _ 
 "Case" &; vbTab &; "150.69" &; vbLf 
 With .Paragraphs(Start:=1).ParagraphFormat 
 .Tabs(1).Alignment = pbTabAlignmentCenter 
 .Tabs(2).Alignment = pbTabAlignmentDecimal 
 End With 
 End With 
End Sub