Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

continuous page numbering through section breaks

8,356 views
Skip to first unread message

jmc

unread,
Aug 24, 2009, 2:16:01 PM8/24/09
to
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.

Stefan Blom

unread,
Aug 24, 2009, 2:30:27 PM8/24/09
to
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

--
Stefan Blom
Microsoft Word MVP

"jmc" <j...@discussions.microsoft.com> wrote in message
news:759A0223-B4E3-4BDD...@microsoft.com...

jmc

unread,
Aug 24, 2009, 3:00:01 PM8/24/09
to
I'm not familiar with macros - bit of a newbie. But I will doublecheck on
saving after making other changes. Thanks.

Sarah Stewart

unread,
Dec 2, 2011, 2:17:39 PM12/2/11
to
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

> On Monday, August 24, 2009 2:16 PM jmc wrote:

> The page numbering in footer returns to 1 after every section break in my
> long document. I have 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 am using Word 2007, odd and even page headers
> and footers. What am I missing? Thanks.


>> On Monday, August 24, 2009 2:30 PM Stefan Blom wrote:

>> What you are doing should be working. However, sometimes Word does not
>> recognize certain modifications and consequently will not allow you to save the
>> document.
>>
>> After you have 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
>>
>> --
>> Stefan Blom
>> Microsoft Word MVP


>>> On Monday, August 24, 2009 3:00 PM jmc wrote:

>>> I am not familiar with macros - bit of a newbie. But I will doublecheck on

Stefan Blom

unread,
Dec 2, 2011, 5:59:06 PM12/2/11
to
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



jodi.s...@gmail.com

unread,
Sep 10, 2013, 5:38:57 PM9/10/13
to
Cheers, the macro worked great. Thanks so much!

adam...@gmail.com

unread,
Dec 2, 2013, 5:06:09 PM12/2/13
to
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 this post 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 another nuance!

Stefan Blom

unread,
Dec 3, 2013, 2:12:21 PM12/3/13
to
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.

--
Stefan Blom
Microsoft Word MVP




<adam...@gmail.com> wrote in message
news:a0c22782-cc4f-41c0...@googlegroups.com...

jnw...@gmail.com

unread,
Dec 17, 2013, 11:52:03 AM12/17/13
to
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

:(

Stefan Blom

unread,
Dec 17, 2013, 3:44:27 PM12/17/13
to
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.

--
Stefan Blom
Microsoft Word MVP




<jnw...@gmail.com> wrote in message
news:fc0c3f43-8e84-4d47...@googlegroups.com...

ju...@petitjean.ca

unread,
Dec 18, 2013, 8:36:36 AM12/18/13
to
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

Stefan Blom

unread,
Dec 18, 2013, 6:39:45 PM12/18/13
to
With many sections, the macro certainly saves time. :-)

Thanks for the feedback!

--
Stefan Blom
Microsoft Word MVP




<ju...@petitjean.ca> wrote in message
news:e23b96bd-f39f-4dff...@googlegroups.com...

santif...@gmail.com

unread,
May 16, 2014, 8:59:31 AM5/16/14
to
Stefan,

I was just having the same problem and your Macro just saved my life! Thanks!!

hillary...@gmail.com

unread,
Apr 23, 2015, 12:33:10 PM4/23/15
to
Thank you, Stefan! Your macro worked like a charm and saved me hours of work!!! Thank you very much!!!

Stefan Blom

unread,
May 25, 2015, 8:45:14 AM5/25/15
to
I'm glad I could help, even though it has been almost six years after I
posted that message. :-)

--
Stefan Blom
Microsoft Word MVP




<hillary...@gmail.com> skrev i meddelandet
news:c0864bde-02d2-451f...@googlegroups.com...

tien...@gmail.com

unread,
May 2, 2016, 4:21:35 PM5/2/16
to
This macro is very helpful. How can I omit the page 1 and start number 1 at page 2. Thank you.

rolf.e.s...@gmail.com

unread,
Jun 8, 2018, 4:20:25 PM6/8/18
to
On Monday, August 24, 2009 at 2:30:27 PM UTC-4, Stefan Blom wrote:
How do you run a macro??????
0 new messages