Reply to topic  [ 4 posts ] 
auto page numbers in body of text 
Author Message

Joined: 2005-01-23 17:12:16
Posts: 122
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? :) )

2016-10-18 23:56:36

Joined: 2005-01-23 17:12:16
Posts: 122
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.

2016-10-19 00:21:50
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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.
$doc =

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

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


2016-10-19 01:54:19

Joined: 2005-01-23 17:12:16
Posts: 122
Thanks for that. It certainly sounds like a more professional way of doing it (although for me, way slower. :) )

2016-10-19 02:00:00
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software