linkied?
Using the Header & Footer Tools Ribbon, you can unlink each Section's header or footer from the previous Section's header or footer
by clicking on the 'Link to Previous' button. Having done that, you can insert a page number field in each Section, formatting it so
that it restarts from whatever number you want. If you want a page count for the Section, use a Sectionpages field.
--
Cheers
macropod
[Microsoft MVP - Word]
"wjprice" <wjp...@discussions.microsoft.com> wrote in message news:B0BB1F0A-3841-4DEC...@microsoft.com...
The header will display something like: Page 66 of 128
The footer will display something like: Page 19 of Section 3
Is that what you need?
--
Terry Farrell - MSWord MVP
"wjprice" <wjp...@discussions.microsoft.com> wrote in message
news:B0BB1F0A-3841-4DEC...@microsoft.com...
--
Stefan Blom
Microsoft Word MVP
"Terry Farrell" <terryf...@msn.com> wrote in message
news:0CB03041-8DDA-487E...@microsoft.com...
I have reread the original question and I see that I misunderstood. The user
wants a running page count for the total document and a running page count
for each section!
So you do need to disable the Link to Previous and it will need formulae
fields.
Sorry to have confused the issue.
Terry
"Stefan Blom" <Stefa...@discussions.microsoft.com> wrote in message
news:efp0P#6DKHA...@TK2MSFTNGP02.phx.gbl...
A suitable formula field is:
{QUOTE{IF{PAGE}= 1 {SET Section0 0}}
{IF{PAGE}<>{NUMPAGES} {IF{={SECTIONPAGES}+{REF {QUOTE Section{={SECTION}-1}}}}={PAGE} {SET {QUOTE Section{SECTION}} {PAGE}}}}
"Page {={PAGE}-{REF {QUOTE Section{={SECTION}-1}}}} of {SECTIONPAGES}"}
--
Cheers
macropod
[Microsoft MVP - Word]
"Terry Farrell" <terryf...@msn.com> wrote in message news:8EFCB943-C554-4824...@microsoft.com...
Terry
"macropod" <macr...@invalid.invalid> wrote in message
news:eoq0Kw#DKHA...@TK2MSFTNGP03.phx.gbl...
--
Stefan Blom
Microsoft Word MVP
"Terry Farrell" <terryf...@msn.com> wrote in message
news:2141AF3B-8BE5-45B1...@microsoft.com...
When i attempt to use field codes such as Numpages or Section i get an error
(undefined). The QUOTE you are using is undefined (unless it means to insert
a quote...single or double). I have tried both to no avai.
I will continue to follow any posts you provide.
Again thank you, eventually i will absorb enough to solve this problem. To
restate: I have XX of XXX in the header which should not be affected by
whatever i do in the footer. In the footer (only for the appendices) i want
it to show A-1, A-2, etc. for each appendix. I will change to B-1, B-2, etc.
for the next appendex and so on.
At this point it is easier to manually do it. But there has to be a way to
automate this process since on my site there are many others who will create
and/or edit documents such as this.
wjprice
For the field code I posted, all the field braces (ie '{}') must be created in pairs via Ctrl-F9 - you can't simply type them or
copy & paste them from my post. The field code is necessarily complicated due to the way Word works. Note that you need to pay
careful attention to the spacing I've shown in the field code - leave any of the spaces out of the IF & SET fields and they'll
likely fail.
The field works by creating a series of bookmarks named Section# (where # is the Section number) and assigning the corresponding
Section's SECTIONPAGES count to them. The code to do this is {SET {QUOTE Section{SECTION}} {PAGE}}, and is only executed on the last
page of each Section, via the IF{={SECTIONPAGES}+{REF {QUOTE Section{={SECTION}-1}}}}={PAGE} test. The code then deducts the
previous Section's page count from the current page number to determine the current Section page# for the X of Y numbering for the
Section.
The {SET Section0 0} field is needed on the first page of the document because there's no Section 0 and the code would generate an
error without it The IF{PAGE}<>{NUMPAGES} test is needed to prevent the code adding an unwanted bookmark for the last Section;
otherwise the output for the last Section becomes unstable.
Once you've created the field and updated it the first time (via F9), it'll automatically calculate the 'Page X of Y' expression for
each Section, without the need for the Section unlinking I referred to earlier.
--
Cheers
macropod
[Microsoft MVP - Word]
"wjprice" <wjp...@discussions.microsoft.com> wrote in message news:DE58B93B-63B4-4527...@microsoft.com...
On the last line of your code there is an extra } and a quote character. Is
this intentional? Here is the line in question:
"Page {={PAGE}-{REF {QUOTE Section{={SECTION}-1}}}} of {SECTIONPAGES}"}
Here is what i receive after entering the code:
“Page !Syntax Error, ! of 3”
I turned on the option to show non-printing characters so i was sure to
enter the code exactly as you posted.
I follow all of your logic in designing this code. I can troubleshoot this
but i do not know the meaning of the QUOTE command. I cannot find it
documented anywhere. I understand that PAGE tells you the current page
number, NUMPAGES gives the total number of pages in the doc, SECTIONPAGES
gives the number of pages in the section, SECTION gives the number of the
current section. i know the stated meaning of REF but am not yet sure of its
exact meaning (in actual practice). But once i understand the command QUOTE
i think i can figure out "how" you set this up.
Once again, thanks for your help for this assistance. I opologize for being
a "doofer" about this. I suspect this all so simple and clear to you like
when i am trying to explain C# code to someone new.
wjprice
The only 'quote' characters are the double quotes on the last line. Except for the field braces, which require the Ctrl-F9
combination, everything should be input exactly as shown - the 'QUOTE' expressions are just that - not quote characters.
--
Cheers
macropod
[Microsoft MVP - Word]
"wjprice" <wjp...@discussions.microsoft.com> wrote in message news:583CD8D7-B906-44CF...@microsoft.com...