Problems with restarting page numbering
Restarting page numbering may lead to two problems.
-
The Statistics page in the document’s Properties (File > Properties) always displays the total number of pages in the document, which may not be what you want to appear in the Page Count field.
-
When page numbering is restarted, OOo always make sure that an odd-numbered page is a right page and an even-numbered page is a left page. It does this by inserting a blank page, if necessary. Sometimes this blank page is not desired, particularly when creating PDFs or when printing single sided.
Solving the page count problem
Suppose you know exactly how many pages are not to be included in the page count. (You want one page to be excluded in the page count for the following example.)
Instead of inserting a Page Count field, you can do the following:
-
Position the cursor where you want the page count to appear.
-
Press F2 to open the formula bar, just above the horizontal ruler in the main Writer window (see Figure 119).

-
After the equal sign, type page –1. If you want to exclude multiple pages, substitute the number of excluded pages for 1 in the formula.
-
Press Enter to close the formula bar and insert the resulting field into the document.
If you do not know the total number of pages in advance, then one approach is to create a set reference on the last page and then insert a cross reference to it. (Refer to Chapter 14, “Working with Fieldsâ€, for more information on setting references and inserting cross references.)
To create a set reference on the last page:
-
Go to the last page (Ctrl+End).
-
Choose Insert > Cross-reference.
-
On the References page of the Fields dialog box (Figure 120), select Set Reference in the Type column.

-
In the Name box, enter LastPage.
-
Click Insert. LastPage is now listed in the Selection column.
To insert a cross-reference to the last page in the header or footer where you want to refer to the total number of pages:
-
Position the cursor at the desired location—for example after the space added after of in the header or footer, as in page xx of yy.
-
Choose Insert > Cross-reference.
-
On the References page of the Fields dialog box (Figure 121), select Insert Reference in the Type column and LastPage in the Selection column. LastPage now appears in the Name box.
-
In the Format column, select As page style. Click Insert.
Notes
|
Do not delete the reference set at the end of the document. If you do, the cross-reference will not work.
If a field, such as a cross-reference, does not automatically update, select the text containing the field and press F9.
|
