1

I have many sections in my document. Right now in the header I'm displaying each section's individual page numbers (for example: Section one has 3 pages, so it displays page 1, page 2, page 3, and section two restarts at page 1, etc.).

I'd like to at the same time in the footer display the document's overall page numbers (like they are usually numbered).

To make the header display as I'd like I clicked Page Number -> Format Page Numbers and told it to not continue from previous section. However, this formatting is universal to the document and I can't have a separate formatting in the footer.

Is this possible to accomplish?

robev
  • 179
  • 3
  • 3
  • 10
  • 1
    I don't have ready access to Word, so I'll give you the gist and maybe somebody else will flesh this out into an answer. You can actually do some very complex page numbering in footers by using filed codes. [This article](https://support.office.com/en-us/article/Add-page-number-X-of-Y-to-a-document-1f273c7c-661c-4444-97b5-c7ec07270f16?ui=en-US&rs=en-US&ad=US) describes a relatively simple Page X of Y, but you can plug in codes for various things. For example {SectionPages} inserts total pages in that section, {Page} inserts the current page number, etc. (cont'd) – fixer1234 Apr 02 '17 at 03:44
  • 1
    So you combine your own text with the fields you want and the footer looks like Page { PAGE } of { SECTIONPAGES }. The full list of field codes is [here](https://support.office.com/en-us/article/List-of-field-codes-in-Word-1ad6d91a-55a7-4a8d-b535-cf7888659a51?ui=en-US&rs=en-US&ad=US). Each one has a link to a help page, including examples. – fixer1234 Apr 02 '17 at 03:45
  • I don't care about how many pages each section has, or how many pages total. I want { PAGE } in the header to display the current page # in this section and in the footer the current page in the document as a whole. I'm not sure if that's possible which is why I am asking – robev Apr 02 '17 at 13:02
  • Take a look at the field codes available. You would combine that with document options, such as new page numbering in each section. Field codes work in headers, as well (actually within the document body, also). You would need to find field codes for the parameters you want to display. I believe you can also do some basic math with field codes, so you can even calculate parameters that might not be canned values. – fixer1234 Apr 02 '17 at 16:11
  • Like I said, from the field codes I found available, the one to display the current page number is the same whether you want section page numbers or document page numbers. – robev Apr 02 '17 at 16:40
  • If you restart page numbering in each section, the {page} field should give you the local number, if I remember right. You could create a calculated field that accumulates the section page totals from previous sections (something like in each section you add the previous cumulative total to the current section total, and for this usage, refer to the previous section's cumulative total). The document page number would then be calculated from the current section page plus the previous cumulative section total. You may need to get creative to use the tools to create what you need. – fixer1234 Apr 02 '17 at 17:20
  • BTW, here's another question with an answer that shows how to do simple arithmetic with fields: https://superuser.com/questions/431188/word-2010-number-of-pages-without-first-page (a different problem, but it show the basic technique). – fixer1234 Apr 05 '17 at 00:02

2 Answers2

0

The only way I've found to accomplish this is to use the { SET } and { REF } fields:

On the first page of the section, use the { SET } field to initialize a variable holding the current page number: { SET pg_var_1 { PAGE }}

Then, in your footer, the document page number is { PAGE } and the section page number is { = {PAGE} - {REF pg_var_1} + 1}

Use CTRL+F9 to open new field brackets, then F9 to run the field. You'll have to repeat this for every section.

matt
  • 1
0

Greg Maxey lays out how to do this in his Page Numbering webpage.

He gives detailed instructions that produce the following:

Screenshot from Greg Maxey's page

Charles Kenyon
  • 4,283
  • 2
  • 8
  • 19