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?

Re: AttachedTemplate by Cindy

Cindy
Sun Apr 24 05:56:02 CDT 2005

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 :-)


Re: AttachedTemplate by Charles

Charles
Sun Apr 24 10:51:11 CDT 2005

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.

"Johan" <Johan@skynet.be> wrote in message
news:4252d491$0$30461$ba620e4c@news.skynet.be...
> 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?
>
>
>