Apache OpenOffice (AOO) Bugzilla – Issue 91311
Page Number accessible for use in formulae
Last modified: 2013-02-07 22:42:23 UTC
There's a PageCount field and a PageNumber field available, but it would be useful to be able to use the PageNumber and PageCount variables in a conditional text formula, so that (for instance) you can assign different text to a footer conditional on whether PageNumber = PageCount, i.e. is this the final page, or display a percentage or whatever. I'm fairly sure this functionality is not present at the moment.
The page count field can be used for conditions, the exact syntax is mentioned somewhere in the help pages. But the use of a page number field could also be useful...
Yes, sorry, didn't make myself clear enough that the Page Count is already available for formulae. The Page Number variable would have to be 'aware' of what page it was on in the same way that the Page Number display field is already, if it's to be useful for page-by-page formulae, such as in a footer.
*** Issue 92127 has been marked as a duplicate of this issue. ***
I agree. I spent the better part of the night trying to use conditional text to place "continued ..." in the footer of all but the last page but found no other way to automatically determine the last page other than comparing current page to total pages, yet the current page number is not available in formulas. Other strangeness...when I use "[Page number] of [Statistics]" (via "Insert-Fields-Page Number and Insert-Fields-Page Count) on a page it displays correctly as "1 of 3" (for example), however if I select that content and paste it as unformatted text, the text that gets pasted is "3 of 3". Seems very odd that the value would display as one value and paste (special, unformatted) as another value.