Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2003 - Templates & macros

Status
Not open for further replies.

Smoulg28

MIS
Aug 5, 2003
10
0
0
NZ
I have created a template and included a few buttons with macros attached to these. When I create a new document from the template, saved it, sent it to a user. The macros will not work. The macros are not being transferred to the document. If I open the document on my PC, I get two warnings about enabling macros (one for the doc & one for the template).
My Question is. – Am I able to get the macros to transfer to document or are they only available via the template.
(I am sure the macros transferred to the document in Word2002.)
Is there a setting I have missed?

thanks
Tore

 
Hi Tore,

the macros are indeed not meant to be transferred to a document when creating this document with a macroed template. This would mean the macros would be n times multiplied and spread out with each document.

If you want to transfer macros to a user, send him your *.dot file and tell him to include it to his templates and add-ins.

Regards,
Andy

[blue]The last voice we will hear before the world explodes will be that of an expert saying:
"This is technically impossible!" - Sir Peter Ustinov[/blue]
andreas.galambos@bowneglobal.de
HP:
 
There is a different solution. I created a survey document that went out to 400 people. I could have done it as a template, but then, as MakeItSo points out, you need to have the template file, the actual template file, available to each person.

The solution is a .doc file, a document that has the macros to run. The macros start on the AutoOpen sub. I locked out all exiting, including the "x" close button etc etc. So once it is opened the file either runs to completion, or exits without any changes.

If the user accepts to run (and this is done by logic, NOT by Word's macro security settings), then on their "OK" the macro creates a new file and copies all the appropriate information to that, names and saves the file. It then closes the original file, which is not changed in any way. That file can be distributed as much as you want. It can not be changed by the user. It is password protected, and also has internal logic that checks for the current logged in name. If that name is not me, it does not even ask for the password. It just closes.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top