
Text:="PAGEREF S" & lngIndex - 1, PreserveFormatting:=False Set oRng = .PreviousĪ oRng, wdFieldEmpty, _ Optional strPlacement As String = "Footers")įor lngHF = 1 To oHDs.Count '.Footers.Count Sub AllOtherSectionSetup(ByRef oSect As Section, ByRef lngIndex As Long, _ Range.Paragraphs(1).Alignment = wdAlignParagraphCenter Set oRng = '.PreviousĪ oRng, wdFieldSectionPages, PreserveFormatting:=False Set oRng = oFldQ.Code '. '.Previous '.PreviousĪ oRng, wdFieldPage, PreserveFormatting:=False Sub FirstSectionSetup(ByRef oSect As Section, Optional strPlacement As String = "Footers") Sections(lngIndex), lngIndex, strPlacementĪ = bUserSetting Sections(1), strPlacementĪllOtherSectionSetup. Sections(lngIndex).īUserSetting = įirstSectionSetup. & "Enter ""H"" to place section numbering in headers.", "Placement", "F")) Select Case UCase(InputBox("Enter ""F"" to place section numbering in footers." _ 'Developed by Greg Maxey and Doug Robbins. The illustration below depicts dual numbering in section 1: Section 1 contains two pages, section 2 contains three pages and section 3 contains three pages.

Note: I use the term "content section" to differentiate and define a document section formed with section breaks consisting of like content (e.g., Marketing, Sales, etc.) from sections formed with section breaks for the purpose of document layout (e.g., page orientation, etc.)įor this demonstration I have used an eight page document containing three sections. Z is the total number of pages in an individual "content" section.Y is the total number of pages in the document.Where X is the page number referenced to Y or Z.

Sometimes people ask: How to display both "Page X of Y Pages" and "Page X of Z Pages" in the header/footer of a document?

The Word MVP FAQ site has several helpful articles on page numbering: Numbering FAQs Dual Page Numbering This Microsoft Word Tips & Microsoft Word Help page provides some helpful links to page numbering reference material plus some tips of my own.
