Page numbering adding sections together

K

Kamran

I am using a Page X or Y format.
I need the Y to have the total number of pages for Sections 3, 4 and 5 of
the document. Is it possible to add the value using SECTIONPAGES for three
sections?
Thanks,
Kamran.
 
J

Jay Freedman

Kamran said:
I am using a Page X or Y format.
I need the Y to have the total number of pages for Sections 3, 4 and
5 of the document. Is it possible to add the value using
SECTIONPAGES for three sections?
Thanks,
Kamran.

Hi Kamran,

You can't do it that way, because anywhere that you use a SECTIONPAGES field
it will evaluate to the number of pages in that section. There's no way to
say something like {SECTIONPAGES Section 3} + {SECTIONPAGES Section 4} +
{SECTIONPAGES Section 5}.

What you can do (assuming page numbering restarts at 1 in Section 3 and
continues through Section 5) is place a bookmark on the last page of Section
5. Let's say you name that bookmark LastPage. Then in your Page X of Y
format, make Y be represented by the field {PAGEREF LastPage}. You do have
to be careful not to delete the bookmark, to avoid "Page X of ERROR!
Bookmark not defined!"
 
K

Kamran

Thanks, Jay. I was afraid that would be the case. The PAGEREF field works
great.

:
 
Top