auto page numbers in body of text

Everything related to our flagship word processor.
Post Reply
ngazidja
Posts: 124
Joined: 2005-01-23 17:12:16

auto page numbers in body of text

Post by ngazidja » 2016-10-18 23:56:36

Yes: is it possible to have auto page numbers in the body of a text or just in the headers/footers? Inserting a page number only inserts to the current page and I want a page number on every page (without having to manually insert into every page).

(Background: I'm clunkily trying to print out 200 copies of a one page form, each of which has a unique serial number. I designed the form in NWP and then realised that rather than printing out 200 copies and hand-numbering them, I could auto this... perhaps? Maybe if the whole document was just one big header? Is that scary or what?)

(Nope, can't make the header cover the whole page - only to 159 mm. Maybe we could fix this? :) )

ngazidja
Posts: 124
Joined: 2005-01-23 17:12:16

Re: auto page numbers in body of text

Post by ngazidja » 2016-10-19 00:21:50

Ok, I've sort of answered my own question: yes and no (if anyone's interested). Since my form was a table, and perfectly sized for the page, I inserted an auto page no. in the appropriate place, copied the whole table and pasted 200 copies. So the page number has to be manually inserted, but holding down cmd-v for 30 seconds is pretty close to auto-inserting on 200 pages.

User avatar
phspaelti
Posts: 954
Joined: 2007-02-07 00:58:12
Location: Japan

Re: auto page numbers in body of text

Post by phspaelti » 2016-10-19 01:54:19

I'm glad to hear that you got this to work, but usually a more appropriate way to do this would be via macro which can quickly insert number as "stamps" in any sequence and without regard to the page number. Such a macro can also be tailored to insert the number in whatever place you desire.
Below is the code that would replace place holders of the shape "###" with running numbers from 1 to however many.

Code: Select all

$doc = Document.active

$nums = $doc.text.findAll “###”

$counter = $nums.count
foreach $num in reversed $nums
	$num.text.replaceInRange $num.range, $counter
	$counter -= 1
end
philip

ngazidja
Posts: 124
Joined: 2005-01-23 17:12:16

Re: auto page numbers in body of text

Post by ngazidja » 2016-10-19 02:00:00

Thanks for that. It certainly sounds like a more professional way of doing it (although for me, way slower. :) )

Post Reply