VBA WORD, How to start page renumbering after 4 pages?
VBA WORD, How to start page renumbering after 4 pages?
Last edited by Aussiebear; 04-10-2024 at 08:01 PM. Reason: Converted to English
Microsoft gives this as an example
So what happens if we went withWith ActiveDocument.Sections(1) .Footers(wdHeaderFooterPrimary).PageNumbers.Add _ PageNumberAlignment:=wdAlignPageNumberLeft, _ FirstPage:=True End With
Just guessing here, while we wait for those experts who are currently slumbering to come calling.With ActiveDocument.Sections(5) .Footers(wdHeaderFooterPrimary).PageNumbers.Add _ PageNumberAlignment:=wdAlignPageNumberLeft, _ FirstPage:=True End With
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
That adds page numbers, it does not restart the numbering sequence.
Doing that requires a Section break before page 4.
You need to know the Word object model for page numbering before you start trying to code it.
Try creating a scratch document and record a macro that restarts the numbering using the Format Page Numbers dialog and look at the code.
These talk about what is going on in Word.
Numbering Front Matter by Suzanne Barnhill, MVP
Page Numbers in Word 2007-2021 (365)
Then look at your recorded code in the vba editor to get an idea of the Word objects and methods involved.
How to Modify a Recorded Macro by Jay Freedman