TabStops.Add method (Publisher)

Adds a new tab stop to the specified TabStops collection.

Syntax

expression.Add (Position, Alignment, Leader)

expression A variable that represents a TabStops object.

Parameters

Name Required/Optional Data type Description
Position Required Variant The horizontal position of the new tab stop relative to the left edge of the text frame. Numeric values are evaluated in points; strings are evaluated in the units specified and can be in any measurement unit supported by Microsoft Publisher (for example, "2.5 in").
Alignment Required PbTabAlignmentType The alignment setting for the tab stop. Can be one of the PbTabAlignmentType constants.
Leader Required PbTabLeaderType The type of leader for the tab stop. Can be one of the PbTabLeaderType constants.

Example

The following example adds a new left-aligned tab stop 0.5 inches from the left edge of the specified text frame.

ActiveDocument.Pages(1).Shapes(1).TextFrame _ 
 .TextRange.ParagraphFormat.Tabs _ 
 .Add Position:="0.5 in", _ 
 Alignment:=pbTabAlignmentLeading, _ 
 Leader:=pbTabLeaderNone

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.