Trouble with text from file and headers

D

Darrell D

Hi,
I am attempting to combine a large quantity of seperate files into one. I
have no trouble with merging the files but am having trouble with the
headers. Each file has a header with a table including content specific to
that file. This table includes two cells that give the "page 1" and the other
"of ?".
After creating a new section and adding the new text, the "of ?" cell in the
header in the previous section, now includes the total pages in the document
not just for that section. So instead of 1 of 1 for the first section it may
state 1 of 5.
Is there a way to get the headers to only include their original number of
pages?
Thanks,
 
P

Pesach Shelnitz

Hi Darrel,

If your headers uses NUMPAGES fields to indicate the total number of pages,
you can create a bookmark at the end of each section and change the NUMPAGES
field in the header for each section to a PAGEREF BookmarkName field.

Write back if you need more detailed instructions.
 
D

Darrell D

Pesach,
I figured out how to see the field codes and unfortunately the templates I
am using have the code, { NUMPAGES \* MERGEFORMAT }, in the "page of" cell. I
am not sure what that code does.
It appears I will have to replace them with a SECTIONPAGE or the PAGEREF to
get it to work right. Unless you have a better idea.

Thanks,
 
P

Pesach Shelnitz

Hi Darrell,

You're half-way there. Since you revealed the codes, all you need to do is
create a bookmark at the end of each section, and in the header for each
section replace NUMPAGES by PAGEREF and the bookmark name. For example, if
you create a bookmark in section 1 called EndSec1, the field code would be {
PAGEREF EndSec1 \* MERGEFORMAT } after the change.

Also, if you want the page number to be the page number within the section,
change PAGE to SECTIONPAGE in the PAGE field codes.
 
S

Suzanne S. Barnhill

The PAGE field always reports the current page number; if numbering is
restarted in each section, then PAGE is the field needed for the page number
within that section. Alas, there is no SECTIONPAGE field, only SECTIONPAGES,
which corresponds to NUMPAGES for the entire document.

It would appear that Darrell currently has a Page X of Y that is Page {
PAGE } of { NUMPAGES }. If numbering is restarted at 1 in each section, then
Page { PAGE } of { SECTIONPAGES } will provide the original pagination, but
if "whole numbers" are *also* required, then NUMPAGES can be used for the Y,
but a PAGEREF will be needed for the page number within the entire document
because PAGE will report the (restarted) number of the page within a given
section.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

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