Share via


LineNumbering.CountBy Property (Word)

Returns or sets the numeric increment for line numbers. Read/write Long.

Syntax

expression .CountBy

expression A variable that represents a LineNumbering object.

Remarks

If the CountBy property is set to 5, every fifth line will display the line number. Line numbers are only displayed in print layout view and print preview. This property has no effect unless the Active property of the LineNumbering object is set to True.

Example

This example turns on line numbering for the active document. The line number is displayed on every fifth line and line numbering starts over for each new section.

With ActiveDocument.PageSetup.LineNumbering 
 .Active = True 
 .CountBy = 5 
 .RestartMode = wdRestartSection 
End With

See Also

Concepts

LineNumbering Object Members

LineNumbering Object