Share via


LineNumbering.StartingNumber Property (Word)

Returns or sets the starting line number. Read/write Long.

Syntax

expression .StartingNumber

expression Required. A variable that represents a LineNumbering object.

Remarks

You must be in print layout view to see line numbering.

Example

This example creates a new document, sets the starting number for footnotes to 10, and then adds a footnote at the insertion point.

Set myDoc = Documents.Add 
With myDoc.Footnotes 
 .StartingNumber = 10 
 .Add Range:=Selection.Range, Text:="Text for a footnote" 
End With

This example enables line numbering for the active document. The starting number is set to 5, every fifth line number is shown, and the numbering starts over at the beginning of each section in the document.

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

This example sets properties for page numbers, and then it adds page numbers to the header of the active document.

With ActiveDocument.Sections(1) _ 
 .Headers(wdHeaderFooterPrimary).PageNumbers 
 .NumberStyle = wdPageNumberStyleArabic 
 .IncludeChapterNumber = False 
 .RestartNumberingAtSection = True 
 .StartingNumber = 5 
 .Add PageNumberAlignment:=wdAlignPageNumberCenter, _ 
 FirstPage:=True 
End With

See Also

Concepts

LineNumbering Object

LineNumbering Object Members