I have substituted your
Code:
.RestartNumberingAtSection = True
in the third loop and this works
almost perfectly. Thank you.
I am still unable to work out how to center the page number on the page (it currently sits in a frame on its own aligned to the right of the document), because
Code:
rng.ParagraphFormat.Alignment = wdAlignParagraphCenter
centers the paragraph, but not the page number.
How do I center the page number frame in VBA? This is quite easy to do by right clicking, Format Frame > Position > Center, but I cannot replicate this programmatically.