I am looking for a way to generate reference numbers in Word 2007 documents, one unique sequential number per document, saved as such.
It seems to be possible using a separate “data” file with previously generated numbers, like mailing address lists, but it’s laborious (and inelegant!)
The idea is a dynamic field that retains the last increment (saved document) and adds 1, then does not automatically update on reopen.
Any ideas would be welcome
When asking questions like this, it would help if you could also provide answers to some standard questions:
What are you trying to accomplish with this?
How well does it have to scale?
How many people will need to use the system?
Are there other places where the number will be used or referenced?
This may not be the best way, but you could have an Excel spreadsheet that you use to generate new Word documents.
A VBA macro in excel could increment a counter, generate a new word document, paste it in to the new word document and then close the doc. (and save the xls and exit)
Right Hunter, I was a bit lght on info.
I need a unique invoice number (usually based on date+sequence) I actually type my invoice, open the last one manually to get the last reference n° and manually insert it incremented by one.
My invoices are based on a personal template, they are saved by clientName for easy retrieval.
I am the sole user/editor of this information, but it must be “hard” saved before transmitting to my accountant. I glitched this year after a filing mistake, and re-edited the whole year’s invoices with the same date due to auto field updates.
I have been trying to use word’s metadata to do this (retrieval and insertion) but my VBA skills are not up to it. Another idea was something like mp3 tags, but I do not know how to implement this.
M$ invoice templates contain a macro button, but I can’t seem to understand what they are linked to, they seem to simply format the reference n°
Depending on the number of invoices you need to deal with, have you considered adopting a database or dedicated invoicing product? If it’s only you using the system, it might not be worth it, but it should provide more flexibility in looking at and managing the data than just using Word.
Thanks yoyodyne, that should do it, it still uses an external file as a variable, but it looks better than lists.
Hunter Hawk, I’ve considered using a dB (I only edit 15 or so invoices/month), and decided against spending hours creating a decent base, only out of laziness filling in reference n°s by hand. my accountant uses a specialised product (way out of my range) that is not even compatible with common dB formats.
I was mainly annoyed at Microsoft for building more and more complex Office programs that do just about anything, except those very things that I wish for. I recently figured out how to convince Word to propose what I wanted as default file name when saving (after 30 odd years of desktops, quite a feat?)
It’s even more frustrating when you see that word has all sorts of counters built into it, (words per document, readability, corrections, etc) as well as metadata stocked in each file. I’m just not patient enough anymore to spend hours “figgerin” and Word is not getting slimmer at all
Since I’m rambling on, the base idea was
-on template open: retreive refNo in MostRecentFile made with this template
-insert refNo +1 into blank template
-prompt for new filename
-save refNo in newFile metadata
Thanks for your counsel