It is correct that a template is used to supply a document with the correct
format but a template can also hold whatever content can be found in a Word
document (hundreds of pages if you wish). Create a template that holds the
exact starting point for a new catering contract (or whatever you are going
to use it for), and any new document you create based on that template will
include exactly that content.
Also note that the macro in the article I posted first was only meant as a
starting point. You can change it as you wish. I you do not want the document
to be saved, then remove the SaveAs line.
In order for you to understand the power of using a template with the
AutoNew macro in it, I suggest you try this:
1. Open one of the documents you have already made and try to save it as a
template (a .dot file). Make sure you have the “Order†bookmark in place.
Store the template in the folder specified in Tools > Options > File
Locations tab as the User Templates folder (TIP: In Word 2003, when you
select Save As and select “Document Template (*.dot)†as the file type, Word
automatically switches to the Templates folder. Give the template an
appropriate name.
2. While your new template is open, store the AutoNew macro in the template
– you can copy the macro from where you have it now (if you need help, see
e.g.
http://word.mvps.org/faqs/macrosvba/CreateAMacro.htm - follow the first
line carefully so that you store the macro in the correct template).
3. Now try to create a new document based on the template: Select File >
New. In the panel to the right, clic “On my computerâ€. In the dialog box that
opens, make sure the “General†tab is selected. Find your new template,
double-click it – and voila, you have a new document that looks exactly as
the template you created – and the number in the “Order†bookmark has been
updated due to the AutoNew macro that is automatically executed when you
create a new document based on the template.
I hope this helps.
--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word