Page 1 of 1
[Solved] Skip unnumbered pages for Page N of NN
Posted: Wed Feb 12, 2025 8:26 am
by SerenusZeitblom
Having documents with a title page (unnumbered) followed by text pages and the demand to show <page> of <pages> in the footer. However, the "statistics" field seems to always uses the page count from the whole document. Is there a way to display only the number of numbered pages. In my example, if the doc has 26 pages, the footer on page 2 should be "page 1 of 25"? Couldn't find anything about this - but I am new to OO and may have missed something...
Re: Achieving something like "section pages" in MS Word
Posted: Wed Feb 12, 2025 8:36 am
by robleyd
So you want to start page numbering from something other than the first page?
See
[Tutorial] Page numbering. Especially the sections
Showing, hiding or restarting the page number and
Total pages number by chapter or section.
Re: Achieving something like "section pages" in MS Word
Posted: Wed Feb 12, 2025 7:39 pm
by MrProgrammer

- 202502121137.gif (42.78 KiB) Viewed 6448 times
I seldom use Writer so it's possible that this simple idea may not be appropriate for your situation. If you need
any additional assistance
attach a Writer document demonstrating the difficulty
(remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself). I will not help further unless you attach.
If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Re: Achieving something like "section pages" in MS Word
Posted: Thu Feb 13, 2025 6:08 pm
by SerenusZeitblom
Thank you, Mr. Programmer. It works, in a way... my use case is I have to deal with programmatically generated DOCX files that "are as they are provided" and change these "page" and "sectionpages" fields to something useful in OO.
If I try to delete the "sectionpages" field OO tells me about read-only content that's not removable, showing field names displays - nothing. I have to delete the whole "page n of m" part to get rid of the r/o invisible...
Adding the setpage variable and pointing to it in the footer works, but the page number itself doesn't adapt, and so it shows "2 of 1", 3 of 2" and so forth.
These are 50+ page documents with a lot of confidential numbers in it. I tried to set up a sample with 3 or 4 pages, but after doing this the whole footer had gone after re-opening the odt. Will try again and attach it later.
Re: Achieving something like "section pages" in MS Word
Posted: Thu Feb 13, 2025 8:52 pm
by Hagar Delest
There is a trick to anonymize a file in that topic:
How to attach a document here.
It may be a vendor lock-in policy due to the use of .docx file format.
But having a look at the file would be best to see if there is an easy fix with AOO or LibreOffice (it may have a better compatibility in this case).
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 7:57 am
by SerenusZeitblom
Thank you for providing the trick to anonymize. I attached the odt I got saving the docx (this is too large to attach). Would be very kind if you could take a look.
I attached 3 screenshots:
- Footer (the forum software doesn't attach it. Is there a maximum of attachments?)
- Footer with Field names
- Footer with selected "56" and trying to remove this
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 8:22 am
by Hagar Delest
Well, another case where LO does better than AOO. It imported the footer better it seems since I can modify it directly:

- Footer.png (6.05 KiB) Viewed 6368 times
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 9:22 am
by SerenusZeitblom
@Hagar Did you manage to get displayed "page 1 of 56" on the 2nd page?
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 10:07 am
by Hagar Delest
Sure, see attachment. Note the field page number at the end that has been set to a bookmark. You can then hide that text with the character properties set to hidden.
The total number of pages is 58 because of the odd/even page number rule that is explained in the tutorial linked above.
Please add
[Solved] at the beginning of the title in your
first post (top of the topic) with the
✎ button if your issue has been fixed.
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 10:28 am
by SerenusZeitblom
I opened the file in LO, AOO refuses to open it, and the footer on page 2 shows "Seite 3 von 58 (total 58). Is it "Seite 1...", when you open it?
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 11:00 am
by Hagar Delest
It is (LO 24.8.2 portable under Windows 10):

- Footer2.png (25.41 KiB) Viewed 6339 times
Note the blank page and the first page without footer.
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 12:44 pm
by SerenusZeitblom
How can I make the blank page visible? How did you make the page 3 counting page 1? Can't find a field code in your document.
Re: Achieving something like "section pages" in MS Word
Posted: Fri Feb 14, 2025 1:06 pm
by Hagar Delest
The blank page is visible in print preview mode or with the Book view left of the zoom slider in the bottom toolbar.
For the field, please check the tutorial linked in the first reply of this topic.
Note that in the document, I used the page number field as the bookmark text. It is easier to follow the tutorial and just put a string that says it is the last page.
Edit: I have changed the attachment to make the bookmark more clear (not as a page number field). |