Don't save macro code in template in generated doc

A

Andy Faust

Hi there. I have a Word .dot template file that I use to generated
pre-formatted documents. The template contains some macro code that prompts
the user for some data then generates a new doc. Anyway the
project/module/code that is contained in the template is also being saved in
the final document; and I don't want that macro code in my final document.
So I wanted to change the macro code in my template to modify the generated
document in some way so when it is saved (by the end-user) the macro code
that was contained in the template should NOT be saved with the newly created
doc file. Any ideas would be appreciated, thanks.
 
J

Jean-Guy Marcil

Andy Faust was telling us:
Andy Faust nous racontait que :
Hi there. I have a Word .dot template file that I use to generated
pre-formatted documents. The template contains some macro code that
prompts the user for some data then generates a new doc. Anyway the
project/module/code that is contained in the template is also being
saved in the final document; and I don't want that macro code in my
final document. So I wanted to change the macro code in my template
to modify the generated document in some way so when it is saved (by
the end-user) the macro code that was contained in the template
should NOT be saved with the newly created doc file. Any ideas would
be appreciated, thanks.

Unless you wrote some fairly complicated code to achieve that particular
end, the doc generated from a macro-filled-dot will not actually contain the
macros. As long as the doc is attached to the dot, the macros will be
available, but will not be part of the doc. In fact, if you detach the doc
from the dot, or just send the doc to someone who does not have the dot, the
doc will be macro free.
So you really do not have anything special to do here...
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
A

Andy Faust

Thanks Jean-Guy.

Jean-Guy Marcil said:
Andy Faust was telling us:
Andy Faust nous racontait que :


Unless you wrote some fairly complicated code to achieve that particular
end, the doc generated from a macro-filled-dot will not actually contain the
macros. As long as the doc is attached to the dot, the macros will be
available, but will not be part of the doc. In fact, if you detach the doc
from the dot, or just send the doc to someone who does not have the dot, the
doc will be macro free.
So you really do not have anything special to do here...
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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