CountBy Property

Microsoft Word Visual Basic

Returns or sets the numeric increment for line numbers. For example, 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. Read/write Long.

Remarks

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