AttachedTemplate

J

Johan

In Word VBA help is an example how to change the AttachedTemplate of a
document:
ActiveDocument.AttachedTemplate = "C:\Templates\Letter.dot"
But when I use this example with my template,
there is always error 5947: document template cannot be changed.
I want to change the template of a lot of Normal based documents,
so how can I do this without getting this error?
 
C

Cindy M -WordMVP-

Hi Johan,
In Word VBA help is an example how to change the AttachedTemplate of a
document:
ActiveDocument.AttachedTemplate = "C:\Templates\Letter.dot"
But when I use this example with my template,
there is always error 5947: document template cannot be changed.
I want to change the template of a lot of Normal based documents,
so how can I do this without getting this error?
Anything special about these documents? Version of Word? Are you able to
change the template via Tools/Templates and Addins?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
C

Charles Kenyon

Any chance you are trying to run this on a template rather than a document?
The attached template of a template will always be the template itself.
--
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.
 

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