View Single Post
  #9   Report Post  
Posted to microsoft.public.word.docmanagement
ddiamondave ddiamondave is offline
external usenet poster
 
Posts: 5
Default How do i insert sequential numbers into a Word document templa

Please explain. The following is instruction 2 pasted from your idiots guide:

In the field directly beneath the macro names list box, pick which template
or document you wish the macro to be saved in. If you select 'All active
templates and documents' - as here - the macro will be saved in the normal
template.

instruction 3 is 'create'
instruction 4 thru 6 cut and paste the macro text... and instruction 7 saves
it

I've been in my invoice template throughout this proceedure. What am I
missing???
"Graham Mayor" wrote:

You didn't follow the instructions, which say that you should put the
autonew macro not in normal.dot, but in the document template ie in your
invoice template.

The macro itself is fairly straightforward and shouldn't cause any problems.
You'll find an essentially similar version at
http://www.gmayor.com/automatic_numbering_documents.htm though this one
doesn't use a bookmark to locate the number, but places it in the header.

Both macros work correctly if you follow the instructions provided.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


ddiamondave wrote:
I'm confused! I followed the instructions and copied the NumberDocs
macro into my normal.dot / newmacros template. I inserted the
bookmark "order" in the space after Invoice# and saved the Invoice
template. But when I open a new document from the template I get a
run-time error that says Method 'PrivateProfileString' of object
'System' failed. The run-time error is numbered '-2147467259
(80004005)'. Can you help me figure out what I did wrong??? I read
all the help files about ERR object properties and tried ON ERROR
RESUME NEXT statement. That produced a document with invoice number
001001, and each successive iteration added another 001 to the
string. ie. 001001001 etc.
Thank you in advance...
ddiamondave

"Jay Freedman" wrote:

Here are instructions for putting the macro into your template:
http://www.gmayor.com/installing_macro.htm

All you need to do is copy the macro from the NumberDocs web page
and paste it into the macro editor the way the installing_macro
article describes. In the body of the template, insert the bookmark
named Order where the number should appear. Then save the template.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Jo wrote:
I have looked at that but am a novice and don't really understand
it - although I have tried to do it!!
Jo

"Jay Freedman" wrote:

Jo wrote:
I have a document template in Word which I use as an Invoice and I
want the numbers to automatically update as I use it. Is this
possible?

See http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org