Tabs Property

Microsoft Publisher Visual Basic

object representing the custom and default tabs for a paragraph or group of paragraphs.

expression.Tabs

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example adds two tab stops to the selected paragraphs. The first tab stop is a left-aligned tab with a dotted tab leader positioned at 1 inch (72 points). The second tab stop is centered and is positioned at 2 inches.

Dim tabsAll As TabStops

Set tabsAll = Selection.TextRange.ParagraphFormat.Tabs

With tabsAll
    .Add Position:=InchesToPoints(1), _
        Leader:=pbTabLeaderDot, Alignment:=pbTabAlignmentLeading
    .Add Position:=InchesToPoints(2), _
        Leader:=pbTabLeaderNone, Alignment:=pbTabAlignmentCenter
End With