Macro to change page numbers

J

jezra85

I have a 400 page document with many sections. When I add page numbers
they reset after each section. I have to manually go through eac
section and select to continue page numbers from previous section. I
there a way to automate this using a macro?
Thank
 
S

Stefan Blom

The following macro should do the trick:

Sub ResetPageNumberinAllSections()
Dim s As Section
For Each s In ActiveDocument.Sections
s.Headers(wdHeaderFooterPrimary) _
.PageNumbers.RestartNumberingAtSection = False
Next s
End Sub
 
J

jezra85

Thanks for your help. It's very useful

'Stefan Blom[_3_ said:
;492357']The following macro should do the trick:

Sub ResetPageNumberinAllSections()
Dim s As Section
For Each s In ActiveDocument.Sections
s.Headers(wdHeaderFooterPrimary) _
.PageNumbers.RestartNumberingAtSection = False
Next s
End Sub

--
Stefan Blom
Microsoft Word MVP



"jezra85" (e-mail address removed) wrote in message

I have a 400 page document with many sections. When I add pag
numbers,
they reset after each section. I have to manually go through each
section and select to continue page numbers from previous section. Is
there a way to automate this using a macro?
Thanks
 
S

Stefan Blom

I'm glad I could help!

--
Stefan Blom
Microsoft Word MVP




Thanks for your help. It's very useful

'Stefan Blom[_3_ said:
;492357']The following macro should do the trick:

Sub ResetPageNumberinAllSections()
Dim s As Section
For Each s In ActiveDocument.Sections
s.Headers(wdHeaderFooterPrimary) _
.PageNumbers.RestartNumberingAtSection = False
Next s
End Sub

--
Stefan Blom
Microsoft Word MVP



"jezra85" (e-mail address removed) wrote in message

I have a 400 page document with many sections. When I add page
numbers,
they reset after each section. I have to manually go through each
section and select to continue page numbers from previous section. Is
there a way to automate this using a macro?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top