-----Original Message-----
Bonjour,
Dans son message, < James > écrivait :
In this message, < James > wrote:
| Once a new document is created it is stored in an
| automated storage system for others to use. Not everyone
| will have the template for the VBA to reference. Currently
| I am having to create each document by hand. The doc has
| user forms and buttons.
So, just intercept the first time it is created. The first person that
creates the document must necessarily have had access to the template, so
the first time it is saved, transfer the code at the same time.
Or, why not make sure that the template is an add-in available to all users
in their start-up folder? With a bit of scripting, when users log in on the
network, the template can automatically be copied into their local machine.
Very handy also if you need to update the templates... users are not
bothered, the next time they log in, their template is automatically
updated.
| I did not have this problem with Excel 2000. When a blank
| XLS is created using an XLT all of the XLT VBA code is
| copied over into the new blank.
|
| Seems odd that Word would not do the same.
Different applications...
In Excel, once you manually create a Toolbar, it is always there (like
PowerPoint). So, unless you are careful, if you have Excel macros that are
really only applicable to one workbook, the toolbar will annoyingly be there
for all workbooks. Word is different, a toolbar is linked to a template, not
the application itself. There are advantages and inconveniences for both
systems.
One big advantage of the Word principle is that if you make changes in the
code, you just change it in one place.... you do not have to chase down all
the documents that rely on that code...Like you will in your case (if you
manage to copy the code in each document)!
Good luck!
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org
.