Footer and Page Break Problems

G

gwh

Hi everyone,

I have two questions if that's okay:

I have a 26 page file and have just inserted a footer displaying x of
26 pages. I didn't want the footer to be on the title page or on the
table of contents page so I took it off these pages and made the third
page start the numbering at number 1. The problem is that on the last
page of the file, in the footer it says page 24 of 26. I know that
there are 26 pages in the file but because I haven't numbered the
first two pages, I need it to say page 24 of 24 on the last page, not
26. Is there a way to do this?

My second question is I've applied shading around the paragraphs in
the file that are heading 1 styles. The problem is that if one of
these paragraphs with shading falls at the very bottom of the page and
then I insert a page break, the very first paragraph on the following
page takes on the shading that's specified in the heading 1 style, and
I don't want this for this particular para. When I try to remove it,
it also removes the shading from the preceding para, ie. the one with
the style applied and this isn't wanted either. Is there also a
workaround here also?

Would really appreciate any tips.

Thanks
 
D

Daiya Mitchell

Hi GWH--

Problem 1) View | Header/Footers. Hit alt-F9 to show field codes. In
the footer, where there is a {NUMPAGES} field, manually edit it to read
{SECTIONPAGES}. 26 is the total number of pages in the document, 24
should be the number of pages in the section. This assumes that you
have a section break between pages 2 and 3, and no other section breaks
in the document. If you have other section breaks, it's still fixable,
just a bit more complicated, ask about it.

Problem 2) The workaround is to not insert manual page breaks, which are
almost always guaranteed to make your life more difficult in the long
run, although they seem like a quick fix in the short run. Explain *why*
you need to insert the manual page break, and we can probably tell you
what to do instead.

And by the way--what version of Word and OS?

Daiya
 
G

gwh

Thanks for the reply Daiya,

I actually have other section breaks in other parts of the file - can
you explain how I'd go about solving the problem with these other
breaks?

Re problem 2, I'm not sure what you mean about the page breaks - I
mean I understand if I don't use page breaks and need a new page to
begin, I just enter as many paragraph returns as needed till I get to
the next page. Or is there another way around?

Also I'm using Word X for Mac and Mac OS 10.3.9,

Thanks for your continued help.
 
D

Daiya Mitchell

Hi--

Problem 1)
You've got 26 pages total, let's say in 4 sections, for an example. You
want the footer to read Page X of Y where Y only includes the 24 pages
that are in the last three sections. So to get the correct Y, you need
to set up a field that adds together the number of pages in Section 2,
Section 3, and Section 4. Does that make sense? If it doesn't make
sense, ask now. It's just an example, you'll need to translate it to
match the number of sections you actually have.

To set up the field that adds together only specified sections, see #1
on this page:
http://gregmaxey.mvps.org/Page_Numbering.htm
The problem that page describes is a little bit different from yours,
but the technique of using a PageRef field to get the number of pages in
a previous section, and then adding those PageRefs together, is what you
want. Assuming my informal explanation made sense, you should be able to
adapt the techniques described there to your needs--know that the
specific field codes in your document will be different from what he
shows there.

Problem 2)
Commonly, people tend to use manual page breaks to manipulate text flow,
because they don't realize that they can set Headings to "keep with
next" to prevent titles from standing alone, or that they can tag other
text "keep together" to prevent it breaking at the wrong time, or that
they can automatically set certain styles to have a "page break before"
to get a chapter to start on its own page. That's why I asked what
function your manual page breaks were supposed to serve, because one of
those formatting tags is usually a better route, as then Word handles
the text flow and updates it as things change. You didn't really
answer--you just said you were using a page break to get a new page, but
the question is, why do you want a new page at that location in the text?

*Why* doesn't necessarily matter, though, so here....Assuming that your
new pages start with some sort of title, use Format | Paragraph to
format that title as "page break before." I think that prevents the
shading carryover problem. You can do this with a regular paragraph,
also, but that seems un-user-friendly--anything you want to start at the
top of a page should have a title, no? If this is consistent--eg, every
Heading 3 starts on a new page, you can add "page break before" to the
Heading 3 style definition.

Though, I have to say--overall it sounds like you *want* a Heading 1
title to land at the bottom of a page with no text after it, which is a
bit unusual.

hope that helps,
Daiya

PS. Just to keep in mind for the future--since these two problems are
not related to each other, even though happening in the same document,
it would have been better to make two separate posts, one for each
issue. Just slightly less confusing for us now and for the archives
later. :)
 
D

Daiya Mitchell

Oops. Messed up. PS re Problem 1 below--totally easier answer--

Daiya said:
Hi--

Problem 1)
You've got 26 pages total, let's say in 4 sections, for an example.
You want the footer to read Page X of Y where Y only includes the 24
pages that are in the last three sections. So to get the correct Y,
you need to set up a field that adds together the number of pages in
Section 2, Section 3, and Section 4. Does that make sense? If it
doesn't make sense, ask now. It's just an example, you'll need to
translate it to match the number of sections you actually have.

To set up the field that adds together only specified sections, see #1
on this page:
http://gregmaxey.mvps.org/Page_Numbering.htm
The problem that page describes is a little bit different from yours,
but the technique of using a PageRef field to get the number of pages
in a previous section, and then adding those PageRefs together, is
what you want. Assuming my informal explanation made sense, you should
be able to adapt the techniques described there to your needs--know
that the specific field codes in your document will be different from
what he shows there.

On second thought, rather than adding up Section 2, 3 and 4 to get the
correct Y, a simpler use of field math would be to set up the Y field as
NumPages minus 2, assuming that you are never going to add anything
beyond the title page and table of contents page. If the table of
contents might expand to more than 1 page as you work with the document
or switch fonts or printers, it would be safer to set the Y field as
{NumPages} minus a PageRef field for the number of pages in Section 1.
Still a tweak of the techniques explained on the linked page--#3 and #4
on that page show more examples of field math that might be helpful.

NumPages is the total number of pages in the entire document, the normal
Y that is inserted by default with Page X of Y.

Sorry if that was confusing! Stupid of me.

Daiya
 
G

gwh

Thanks for all that info. Firstly, problem 2 has been solved with your
suggestions which is great, but I'm still having a problem with the
first question. Since the table of contents might expand to more than
1 page I decided to set the Y field as {NumPages} minus a PageRef
field for the number of pages in Section 1 as you suggested. I
bookmarked the last word (actually it was a page number in the TOC
since this was the last characters in section 1) and then edited the
field in the footer like this:

{ PAGE } of {{NUMPAGES}-PageRefS1}

When I updated the field, the first footer just read Page 1 of - ie.
there was no number after the word "of". My edit obviously didn't
work. Since I don't have a lot of experience with field codes I may
have just incorrectly nested the code or something. Can you tell me if
the above code is correctly written or not?

Thanks again for your help.



11 of
 
G

gwh

Thanks for that Clive - I've downloaded your file and will take a
closer look when I get a bit more time. I'm still really stuck on the
field code problem though and need to get the document out today. As I
think Daiya is in a different time zone, would you be able to provide
some tips on my first problem as indicated in my last post?
 
C

CyberTaz

I just came in at a glance, but since you seem to be pressed for time...


{ PAGE } of {{NUMPAGES}-PageRefS1}

Each field ref needs braces - I believe it should read as:

{ PAGE } of {{NUMPAGES}-{PageRefS1}}

HTH |:>)
Bob Jones
[MVP] Office:Mac
 
G

gwh

Thanks for that Bob. I've actually just tried it and I'm still getting
the same thing, ie. no number for that field.

I'm not sure what I'm doing wrong?
 
G

gwh

Yes I inserted the correct braces by using cmd-F9 but still with no
result. I don't know if this has anything to do with it not working
but the title page is section 1, the TOC page is section 2 and then
it's on page 3 which is section 3 where I need the numbering to begin.
I just wondered if I need to change the field code since there are 2
sections before the page where I need the footer?
 
D

Daiya Mitchell

Yes, you would need to subtract both Section 1 and Section 2 from the
total number of pages.

You might not need the section break between the title page and the
TOC--what did you put it in to do?

But see my other post on the field code.
 
G

gwh

I need the section break between the title page and TOC because I've
centred the contents of the title page vertically - something I didn't
want for the TOC page.

Okay, so since I need to subtract sections 1 and 2, I've bookmarked
both sections - S1 and S2, then I've written the following:

{ PAGE } OF {={NUMPAGES}-({PageRefS1}+{PageRefS2})}

I assume this subtracts the total of sections 1 and 2 from the total
number of pages, but I'm now getting a syntax error. I'm reallly sorry
I can't get this right but can you tell me what I might be doing wrong?
 
D

Daiya Mitchell

No need to apologize--to be honest, I'm learning too, as I learned the
procedure from that page but have not had to practice it thus far. Which
is why my help has not been so efficient. :)

The nesting looks correct.

There should be a space between PageRef and S1, and PageRef and S2. In
fact, often bookmarks are put in quotation marks, so if adding the space
doesn't work, also try {PageRef "S1"}, which should be equivalent to
{PageRef S1}. And so forth for the other PageRef field. Sorry I didn't
catch that before--CyberTaz and I just copied the field you had.
 
G

gwh

Adding the space worked, in that it gave me no syntax error and a
number appeared when I toggled the field but the page number was 27.
Since there are 26 pages in the file, subtracting 2 should have given
me 24. I can't work it out.
 
D

Daiya Mitchell

Sorry again, and sorry for the delay--I had to create a fake document
here to mimic yours.

Depends on your numbering whether you needed to subtract just Section 2
or both Section 1 and Section 2.

Assuming you didn't restart numbering in Section 2--then subtracting
both meant you subtracted 1 (the page number for section 1) and 2 (the
page number for section 2), making 3 total.

If Section 2 had restarted numbering, then subtracting both is necessary
in order to subtract 1 (the page number for section 1) and 1 (the page
number for section 2).
 

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