Microsoft Word consecutive numbering macro...please help!!

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

bobbygills

Thread Starter
Joined
Jan 23, 2013
Messages
2
Hi.

I'm looking to have MS Word put a consecutive invoice number into a template every time I open or save it. I've heard that there's a macro or something but I'm sure what to do. Hope you guys can help!

Thanks in advance
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
Hi, welcome to the forum.
You haven't mentioned which version of MS Office you're using and really explain little of what you want.
I've no idea how to put it together for consecutive numbers but I used a little tirck once that generates a unique number every time the template is opened and directly saved as a named file
The unique number created is baed upon the durrent date and time and the number is built up as follows:
yyyymmrrhhmm (yaer-month-day-hour-number -> 201201241547

The attached template file does just that to demonstratie it maybe you can put it to use for your needs.
It's for office 2007 or 2010 and maybe even 2003 but thetn I don't knwo how the saving goes. The AutoOpen macro will probably need editing for your needs but you have something to play around with.
I'm attaching the template file as wel as the resulting file. in zip format because template files are not permitted.

Happy coding and i hope it helps :)

BTW the numbers will never be identical but consecutive in the sense 1, 2 3 4, etc...
 

Attachments

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
I like it (y) but this will only work if the user is allowed to modify the registry
 

bobbygills

Thread Starter
Joined
Jan 23, 2013
Messages
2
Thanks for the replies! Has anyone got step by step instructions on how to do an autonew macro? Also on your template kebellah it just said invoicenr? And I not doing something right? Also how do I put those numbers into another document so it will populate there?
Its Word 2007. Many thanks!
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,612
Have you enabled macro's? It works in both 2007 or 2010.

You should open a new file using the tamplate not just open it.

Once you open it with macro's enabled it works.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top