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 / February 2005

Tip: Looking for answers? Try searching our database.

change attached template

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vin - 19 Sep 2004 00:15 GMT
Hi,

I am trying to change the attached template programmatically. The word help
says:

ActiveDocument.AttachedTemplate="C:\TheFile\theTemplate.dot"

but I keep getting a runtime error 5947

Please help

Thanks
vin
Perry - 19 Sep 2004 08:17 GMT
Nothing wrong with yr 'code'.
You can assign and de-assign templates back/forth.
Something else is bugging you...

You'll have to forward some more code for the group to investigate

Krgrds,
Perry

> Hi,
>
[quoted text clipped - 9 lines]
> Thanks
> vin
Nick Stebbing - 21 Sep 2004 05:43 GMT
Hi vin,

I think I've had this problem before. For me it seemed that word was
treating the document as a template (which cannot have a template attached to
it).

Have a look at the properties item in the file menu. In the General tab is
the document "type" listed as a template?

Nick S

> Nothing wrong with yr 'code'.
> You can assign and de-assign templates back/forth.
[quoted text clipped - 19 lines]
> > Thanks
> > vin
vin - 22 Sep 2004 23:39 GMT
Thanks for your responses. I moved the code from ThisDocument into a separate
code module and it worked. So I am happy and baffled.

vin

> Hi vin,
>
[quoted text clipped - 30 lines]
> > > Thanks
> > > vin
Vijaybabu Sukumar Nakkonda - 08 Feb 2005 16:28 GMT
Hai sir,

   I read your messages.  I too have the same problem.  I am unable to
change the template in active document. You have told that you moved the
code in another module.  Please help me to solve my problem. i have some
set of vba word codings in a document i want to attach a template with this
document.  What can i do. please help me. send message thro my mail id
nsvijaybabu@gmail.com

By
Vijaybabu
 
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.