Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

AttachedTemplate

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johan - 05 Apr 2005 19:09 GMT
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?
Cindy M  -WordMVP- - 24 Apr 2005 11:56 GMT
Hi Johan,

> In Word VBA help is an example how to change the AttachedTemplate of a
> document:
[quoted text clipped - 3 lines]
> 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 :-)
Charles Kenyon - 24 Apr 2005 16:51 GMT
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.
Signature

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.

> In Word VBA help is an example how to change the AttachedTemplate of a
> document:
[quoted text clipped - 3 lines]
> I want to change the template of a lot of Normal based documents,
> so how can I do this without getting this error?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.