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

Tip: Looking for answers? Try searching our database.

Word template only works on one PC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
epigram - 11 Jan 2005 12:53 GMT
I have a Word 97 template file (i.e. .DOT file) that is on a particular PC
in our office.  The template uses VBA to connect to an Access database
(located
on a server share) and creates a document based upon some data.  When I
simply move the particular .DOT file to any other PC and try to create a new
file using that template, part of the code fails.  When I launch the VBA
editor for the template file on the working PC there are several items that
I can see that I cannot see when I launch the VBA editor for the template on
any other PC:

1) A Modules node under the Normal node that has two modules in it.  I can
click on these and examine the code.

2) Three additional TemplateProject folders.  Although, when I try to view
the code for these TemplateProject folders I get a dialog box that says
"Project is unviewable".

I can tell, based upon the name of one of the TemplateProject folders, that
the template VBA code fails (it's a call to WordBasic.Call) on every other
PC because these TemplateProject folders (as well as the aforementioned
Modules) don't seem to exist on those PCs.  So, my basic question is why can
I see these VBA project elements on the working PC, but not on any other
PCs?  I assume there must be some files and/or environment settings on the
working PC.  Any help would be much appreciated.

Thanks.
Jonathan West - 11 Jan 2005 13:44 GMT
>I have a Word 97 template file (i.e. .DOT file) that is on a particular PC
> in our office.  The template uses VBA to connect to an Access database
[quoted text clipped - 25 lines]
> PCs?  I assume there must be some files and/or environment settings on the
> working PC.  Any help would be much appreciated.

These additional template folders must each be part of a different template,
because you can only have one project in each template.

If they are unviewable, this suggests that they have been loaded as add-ins.
If they are loaded automatically, this is probably because they are in
Word's Startup folder.

In Word, Go to Tools, Options, File Locations to get the location of the
startup folder. You will probably find the additional templates there.

If they aren't in the ser startup folder, then they may be in the startup
folder within the Progam Files folder where Office is installed.

You can only view the code in a template when the template is actually open
as a document rather than loaded as an add-in. So to see the code, navigate
to the startup folder and open the template there.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

epigram - 11 Jan 2005 15:36 GMT
Found the files in the startup folder, moved them to the other PC and the
template works correctly now.  Thanks!

>>I have a Word 97 template file (i.e. .DOT file) that is on a particular PC
>> in our office.  The template uses VBA to connect to an Access database
[quoted text clipped - 46 lines]
> open as a document rather than loaded as an add-in. So to see the code,
> navigate to the startup folder and open the template there.
Tom Winter - 11 Jan 2005 14:01 GMT
The odds are that those modules under Normal show up because someone
recorded some macros. Those are in Normal.dot. The TemplateProject folders
are likely add-in templates. From Word, go to TOOLS | TEMPLATES AND ADD-INS.
You'll probably see some files listed there. If you actually open up those
.DOT files, then you'll be able to go into the VBA editor and open up the
TemplateProject nodes. You may need to copy those add-in templates onto the
other machines.
Signature

Tom Winter
Tom@NoSpam.AmosFiveSix.com

> I have a Word 97 template file (i.e. .DOT file) that is on a particular PC
> in our office.  The template uses VBA to connect to an Access database
[quoted text clipped - 22 lines]
>
> Thanks.
epigram - 11 Jan 2005 15:36 GMT
Found the files in the startup folder, moved them to the other PC and the
template works correctly now.  Thanks!

> The odds are that those modules under Normal show up because someone
> recorded some macros. Those are in Normal.dot. The TemplateProject folders
[quoted text clipped - 41 lines]
>>
>> Thanks.
 
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.