1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

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

Discussion in 'Business Applications' started by bobbygills, Jan 23, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. bobbygills

    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
     
  2. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,576
    First Name:
    Hans
    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...
     

    Attached Files:

  3. Abe999

    Abe999

    Joined:
    Nov 5, 2012
    Messages:
    115
  4. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,576
    First Name:
    Hans
    I like it (y) but this will only work if the user is allowed to modify the registry
     
  5. bobbygills

    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!
     
  6. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,576
    First Name:
    Hans
    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.
     
  7. Sponsor

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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1086507

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice