LineNumbering object (Word)

Represents line numbers in the left margin or to the left of each newspaper-style column.

Remarks

Use the LineNumbering property to return the LineNumbering object. The following example applies line numbering to the text in the first section of the active document.

With ActiveDocument.Sections(1).PageSetup.LineNumbering 
 .Active = True 
 .CountBy = 5 
 .RestartMode = wdRestartPage 
End With

The following example applies line numbering to the pages in the current section.

Selection.PageSetup.LineNumbering.Active = True

See also

Word Object Model Reference

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.