PageNumbers.RestartNumberingAtSection property (Word)

True if page numbering starts at 1 again at the beginning of the specified section. Read/write Boolean.

Syntax

expression. RestartNumberingAtSection

expression An expression that returns a 'PageNumbers' collection object.

Remarks

If set to False, the RestartNumberingAtSection property will override the StartingNumber property so that page numbering can continue from the previous section.

Example

This example adds page numbers to the headers in the active document, and then it sets page numbering to start at 1 again at the beginning of each section.

ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary) _ 
 .PageNumbers.Add Pagenumberalignment:=wdAlignPageNumberCenter 
For Each s In ActiveDocument.Sections 
 With s.Headers(wdHeaderFooterPrimary).PageNumbers 
 .RestartNumberingAtSection = True 
 .StartingNumber = 1 
 End With 
Next s

See also

PageNumbers Collection Object

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.