Adding a serial number to a form

R

richardb

I am printing single page Encounter Forms for a medical office and want each
form to have a unique serial number. I'd appreciate advice (or KB reference)
how to do this. One method might be to place the page number where I want the
serial number to appear. I would need code to retrieve the last used number
from somewhere and then set the "starting [page] number" to n+1. Finally,
write the last number used back to where I got it from. If that will work,
can someone help me with some of this code?
Thank you.
 
R

richardb

Thank you Jonathan; that's a start. However, the "Encounter Forms" will be
produced as a mail merge run where each page is a new form. Each page has to
increase the s/n by 1. If the first [single page] form has s/n 1, then the
next must have 2, etc. That is why I thought to use the page number field,
and use the number I retrieve from Settings.Txt to set the starting page
number. At the end of the run, I'd have to know how many pages were printed
(n+totalpages) and write this back to Settings.Txt. Any further thoughts?

Jonathan West said:
Hi Richard

Take a look here

Creating sequentially numbered documents (such as invoices)
http://www.word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

richardb said:
I am printing single page Encounter Forms for a medical office and want
each
form to have a unique serial number. I'd appreciate advice (or KB
reference)
how to do this. One method might be to place the page number where I want
the
serial number to appear. I would need code to retrieve the last used
number
from somewhere and then set the "starting [page] number" to n+1. Finally,
write the last number used back to where I got it from. If that will work,
can someone help me with some of this code?
Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top