Word template only works on one PC

E

epigram

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.
 
J

Jonathan West

epigram said:
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.


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.
 
T

Tom Winter

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.
 
E

epigram

Found the files in the startup folder, moved them to the other PC and the
template works correctly now. Thanks!
 
E

epigram

Found the files in the startup folder, moved them to the other PC and the
template works correctly now. Thanks!
 

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