How do I automatically number a word document sequentially from a template?

Anonymous
2023-12-10T16:16:33+00:00

I am trying to create a template for my 'job write-ups' in work.

I was wondering if their was a way I could set a field so that every time I open the template, the "Job Number - X" would increase by 1, so that I don't need to format it every time I create a new document.

Microsoft 365 and Office | Word | Other | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. John Korchok 223.7K Reputation points Volunteer Moderator
    2023-12-10T22:26:10+00:00

    You would have to write a VBA macro that stored a variable somewhere. That variable would be the record of the last-used number. Then, when you create a new document, the Macro would read the variable, increment it by 1, then store the updated value. Here are some pages with similar code that can get you started:

    Implement auto-increment with Word macro

    Creating sequentially numbered documents (such as invoices)

    Word Macro - auto increment invoice number

    1 person found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Charles Kenyon 159.1K Reputation points Volunteer Moderator
    2023-12-11T19:31:51+00:00

    You may also want to take a look at Automatic numbering of Word documents by Graham Mayor, MVP which has both vba code and an Add-In to manage this. He writes from a Word for Windows perspective but he worked on the code already referred to.

    0 comments No comments