Q: My customer has a document, which needs to be printed X times. On the first page of each copy, there must be a unique number, which has to be increased per copy.
A: The theory:Define a form with "Forms & Field Installer" (F&FI) which positions an ELP variable on the place you need the counter . This form is inserted on every copy. Therefore the form number needs to be over 25000, otherwise the form would be only loaded once on the first page and will not be increased on every copy.The insertion of the form is done with an ELP_Command The counteritself is increased by a search of a unique information in the form.
Start the F&FI and generate a new form, which positions the variable number on the page and define the variable within that form. The variable nameshould be #MyCounter#"Then generate with the MS Word Macro of F&FI a new form with macro number over 25000(!). This will tell ELP to reload the form on every page used. Here used 25555As macros are usually also searched, the term #MyCounter# will be replaced with its actual value defined at the beginning of the process in Section GLOBAL).
; Defines the first counter value, so start with 100, as the
; counter increase is found before the value is printed
; #'s are not needed, as they are surrounded automatically
; Prints on every first page the form 25555, which is always reloaded
; K10; Prints 10 copies
; C1:1F25555; prints the form 25555 on every page
; D1; Default copy definition is the first copy, so on all first pages will be printed the form 25555
; Search a unique data in the macro in order the counter can be increased
; While writing out the macro definition 25555 is found then
; increase counter by 1
;Reads all stored variables from the file
; Stores the value and name of the variable #MyCounter# at the process end into the provided file
Instead of #MyCounter# those default variables can be used as well:
#JOB_COUNTER# Unique Counter for each job, use key JOBCOUNTER
#ACCTOTALPAGES# Actual page counter over all pages and copies
#PAGECOUNT# Within a copy
#COPYCOUNT# The copy counter, e.g. for watermarks or as above
As a last example here the simply GLOBAL rule for the copy counter watermark, also