Incremental Numbering of new documents

T

thorsteinn

Hey all

I'm creating a document template for a form to be filled out onscreen
by several users on a network. People will fill out their forms using
the template to create new documents, and then save them as new
documents and print them.

Is there any way to make it so that every new document created from
this template will have a unique number, visible on the document of
course. This number should be incremented each time a new document is
created from this template.

I also want the name of the saved document to have this unique number.

I'm a little bit lost here, but I figure the solution might have
something to do with Visual Basic, of which I am only slightly familiar
with.

Best,
Thorsteinn
 
T

Thorsteinn Kolbeinsson

Well, I went through that page and it works... as long as I don't save
my template in a protected state. If I create new documents from the
template I get the error message: "This method or property is not
available because the object refers to a protected area of the
document"

If I unprotect the template and save it, freshly created documents work
fine.

Also, the code: ActiveDocument.SaveAs FileName:="path" & Format(Order,
"00#")
saves the document in the My Documents folder. How can I change that? I
want to change that in the template, so the user creating the new
documents doesn't have to think about it and the docs are all saved in
one place on the network drive.
 

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