Class TabStop (PowerPoint VBA)

The class TabStop represents a single tab stop. The TabStop object is a member of the TabStops collection. The TabStops collection represents all the tab stops on one ruler.


To use a TabStop class variable it first needs to be instantiated, for example

Dim tsp as TabStop
Set tsp = ActiveWindow.RangeFromPoint.TextFrame.Ruler.TabStops(Index:=1)

The following procedures can be used to set variables of type TabStop: TabStops.Item, TabStops.Add and Ruler.TabStops


Clears the specified tab stop from the ruler and deletes it from the TabStops collection.



Returns the parent object for the specified object.


Returns or sets the position of the specified tab stop, in points.

ActivePresentation.Slides(1).Shapes(1).TextFrame.Ruler.TabStops(1).Position = 4


Represents the formatting of a tab stop.

Possible Values are ppTabStopCenter - Center tab stop, ppTabStopDecimal - Decimal tab stop, ppTabStopLeft - Left tab stop, ppTabStopMixed - Mixed, ppTabStopRight - Right tab stop.

The value of the Type property can be one of these PpTabStopType constants.

ActiveWindow.RangeFromPoint.TextFrame.Ruler.TabStops(1).Type = ppTabStopCenter


Creates a tab stop and adds it to the TabStops collection.

The Type parameter value can be one of these PpTabStopType constants.

Syntax : expression.Add (Type, Position)

Dim tsp As TabStop
Set tsp = ActiveWindow.RangeFromPoint.TextFrame.Ruler.TabStops.Add(Type:=ppTabStopCenter, Position:=)


The following arguments are required:

Type (PpTabStopType) - The type of the tab stop to be added.

Possible Values are

ppTabStopCenter Center tab stop
ppTabStopDecimal Decimal tab stop
ppTabStopLeft Left tab stop
ppTabStopMixed Mixed
ppTabStopRight Right tab stop

Position (Single) - The position of the tab stop in the tab stops collection.


Returns the number of objects in the specified collection.

Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.TextFrame.Ruler.TabStops.Count


Returns or sets the default tab-stop spacing for the specified text, in points.

ActivePresentation.Slides(1).Shapes(1).TextFrame.Ruler.TabStops.DefaultSpacing = 26


Returns a single tab stop from the specified TabStops collection.

Syntax : expression.Item (Index)

Index: The index number of the single TabStop object in the collection to be returned.

Dim tsp As TabStop
Set tsp = ActiveWindow.RangeFromPoint.TextFrame.Ruler.TabStops(Index:=1)


Returns the parent object for the specified object.