continuous page numbering through section breaks

J

jmc

The page numbering in footer returns to 1 after every section break in my
long document. I've repeatedly "fixed" this by clicking the "Continue from
previous section" button in the Page Number Format dialog box for each
section and saved the document. But when I open the document again, each
section starts back at page 1. I'm using Word 2007, odd and even page headers
and footers. What am I missing? Thanks.
 
S

Stefan Blom

What you are doing should be working. However, sometimes Word doesn't
recognize certain modifications and consequently won't allow you to save the
document.

After you've selected the "Continue from previous" option, does it help if
you also make a change in the document, such as adding and deleting a
character, before saving?

You may also want to try running the following macro, just to be sure that
the restart option is being modified for all sections (even continuous ones
without visible headers and footers):

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

jmc

I'm not familiar with macros - bit of a newbie. But I will doublecheck on
saving after making other changes. Thanks.
 
S

Sarah Stewart

I just happened to come across your answer (that included the macro for page numbering) and found it to be extremely helpful.

Not sure why it happened in the first place, but all of a sudden my page numbers were acting up. (I am using MS Word 2007.) Perhaps it had something to do with my inserting "blank pages," so maybe the flow of page numbers were disrupted.

Anyway, after using your macro, my doc is perfect now. Thanks so much!

-Sarah Stewart
 
S

Stefan Blom

It's difficult to determine what has happened, specifically, in your
document. Generally, though, page numbering options, such as restarts,
are section-specific. And Word inserts section breaks whenever you
change the margins, add columns, or add orientation for the selected
text paragraphs. Also, if page numbering options have changed in one
section (for some reason), that setting will be copied into the new
section when it's created.

Stefan Blom
Microsoft Word MVP
 
A

adamsjiml

The page numbering in footer returns to 1 after every section break in my
long document. I've repeatedly "fixed" this by clicking the "Continue from
previous section" button in the Page Number Format dialog box for each
section and saved the document. But when I open the document again, each
section starts back at page 1. I'm using Word 2007, odd and even page headers
and footers. What am I missing? Thanks.

I had this issue in Word 2013. I was making changes to a document with Track Changes on when I set up the sections and used the macro included in thispost to fill in the numbers. The macro worked fine but when I save it and reopened it, each section was set back to beginning with page 0. Turns out I needed to accept all the formatting changes to create the sections/headers and footers. THEN the page numbering would stick when saved. Just anothernuance!
 
S

Stefan Blom

Field results and auto numbers may display incorrectly when you are tracking
changes. This is by design in Word. As you have noted, accepting (or
rejecting) changes fixes it.
 
J

jnwilde

This was very useful, so thank you stefan, but it must be said its really not a great experience to need to find a script to fix page numbering

:(
 
S

Stefan Blom

To clarify, this thread deals with two matters: restarting page numbers when
there are continuous section breaks present and the behavior of fields when
Track Changes is enabled.

Note that you don't have to use a macro in order to adjust the page
numbering. Actually, recent versions of Word make it easier to change page
number restart options even for continuous sections. In Word 2007 and later,
you can access the Page Number Format dialog box via Insert tab | Page
Number | Format Page Numbers.
 
J

jules

A very useful macro. Thank you so much.

I struggled for an hour trying to get page numbers to be continuous across 30 pages, with each page containing multiple sections as I switched back and forth between having 1 and 2 columns.

I tried selecting all the sections and formatting page numbers to "Continue from previous section" (this required manually adding the Format Page Numbers to a ribbon). This did not work.

The macro reset everything so that page numbers were all continuous, across all sections, and I was able to manually update where I wanted pages to start from 1. Perfect. Thanks again.

Regards,

Jules
Aerospace Engineer
 

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