Changing Invoice # automatically on document

B

Buttercup

I am using the templates in word for invoices. Is there a way I can set up
the invoice # to change everytime I print/save a new invoice.

I just started using these invoices thru Word so any other suggestions would
also be helpful.

So far, I have set up the template and added form fields. Upon exiting I am
saving each one into a folder for the month of that year.

Thank you
 
J

Jonathan West

Buttercup said:
I am using the templates in word for invoices. Is there a way I can set up
the invoice # to change everytime I print/save a new invoice.

I just started using these invoices thru Word so any other suggestions
would
also be helpful.

So far, I have set up the template and added form fields. Upon exiting I
am
saving each one into a folder for the month of that year.

Thank you

Take a look here

Creating sequentially numbered documents (such as invoices)
http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm
 
M

Malcolm Smith

Buttercup

What you could do is to have an ADO connection to a database somewhere (if
there is more than one user of this template make it to somewhere on the
LAN) which gets the next invoice number and then increments it for next
time.

- Malc
 
B

Buttercup

Thank you,

I haven't worked with Macro's at all, I followed the directions and it
worked perfectly. The only thing was my file was protected and it wouldn't
run until I changed it to no longer be protected{which I'm sure I could just
alter the code a little to correct that}. Do you know how to change the code
to allow this? I would like to protect the document since I create a form &
would like to tab thru the fields. I see where I need to change the code but
I do not know what I need to change it to. Like I said, I am new to Macros,
and appreciate any help/advise you can offer.

Thank you very much for your help.

~Buttercup
 
J

Jonathan West

Buttercup said:
Thank you,

I haven't worked with Macro's at all, I followed the directions and it
worked perfectly. The only thing was my file was protected and it
wouldn't
run until I changed it to no longer be protected{which I'm sure I could
just
alter the code a little to correct that}. Do you know how to change the
code
to allow this? I would like to protect the document since I create a form
&
would like to tab thru the fields. I see where I need to change the code
but
I do not know what I need to change it to. Like I said, I am new to
Macros,
and appreciate any help/advise you can offer.

General advice on dealing with macro code samples can be found here

What do I do with macros sent to me by other newsgroup readers
to help me out?
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

These beginner articles on VBA will be helpful

Getting To Grips With VBA Basics In 15 Minutes
http://word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm

Creating a macro with no programming experience using the
recorder
http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm


The ActiveDocument.Protect method can be used to set the protection of a
document. Type this into the VBA editor , position the cursor in the word
"Protect" and then press F1. The Help entry for the Protect keyword will
appear, telling you all the options that are available for it. You are
wanting to set protection for forms.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top