TabStops Property

Microsoft Word Visual Basic

TabStops Property

       

Returns or sets a TabStops collection that represents all the custom tab stops for the specified paragraphs. Read/write.

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example adds a centered tab stop at 2 inches to all the paragraphs in the active document. The InchesToPoints method is used to convert inches to points.

With ActiveDocument.Paragraphs.TabStops
    .Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With

This example sets the tab stops for every paragraph in the document to match the tab stops in the first paragraph.

Set para1Tabs = ActiveDocument.Paragraphs(1).TabStops
ActiveDocument.Paragraphs.TabStops = para1Tabs