Share via


TabSize Property

Home Page (Objects)OverviewFAQReference

Applies to: TextDocument object

Gets or sets the number of columns in a tab character.

Syntax

object**.TabSize** [=value]

Parameters

object

An expression that evaluates to a TextDocument object.

value

A Long that represents the number of columns in a tab character.

Remarks

The TabSize property has the Long type.

When you press TAB, you create an indent equal to the size specified by the IndentSize property. Within that indent are tabs equal to the size specified by the TabSize property.

However, if the indent size is not a multiple of the tab size, each indent consists of space characters as well as tab characters. For example, if the indent size is seven and the tab size is three, pressing TAB at an indent location inserts two tab characters (each three spaces wide) and one space character (one space wide).

Example

The following example sets the number of columns in a tab character to 5 in the active document:

ActiveDocument.TabSize = 5

See Also   Tabify method, Untabify method.