prevent template macros copying to new documant

R

RobMcKinnon

I have macros in a template used to create a specific naming convention when
saved. I do not want these templates in the newly created document. Is it
possible to set Word to not copy the macros? If so how?

Please respond to my email address (e-mail address removed)

Thanks!
 
C

Charles Kenyon

Unless you go to extraordinary lengths, macros are not copied to a document
based on a template.

However, since the template is still attached to the document, the macros
will be available in the document. If your macros are stored in a custom
document template you can make them unavailable to the document by attaching
the normal.dot template to the document. Tools > Templates and Add-Ins...

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
N

Needmo Smarts

All:
I was just (over last several days) discussing this concern w/Perry.
I finally found what I wanted by the following...
This code doesn't remove anything from the .DOT -- it just breaks any
association between the .DOC and the "master" .DOT.

Sub Document_Close()
If ActiveDocument.Type = wdTypeDocument Then
With ActiveDocument
.AttachedTemplate = ""
End With
MsgBox "Thanks for your patronage."
End If
End Sub

Good day,
Warren
 

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