Word Template in Startup folder loses dll references

M

Marceepoo

A Word template located in the User's Startup folder repeatedly loses
references to DLLs. This causes macros to fail to run, and to generate the
following dialogue box error message: "Compile error: Can't find project or
library". For example, when the ("Compile error:...") dialog box error
message appears, the word "Left" is highlighted on the following line:
strPathTest = Left(strPathDoc, 8)
Each time this occurs, I have to open VBA, click on tools, references, and
then tried to figure out which DLL file got disconnected this time.

Does this mean that the template is corrupt?
What causes this? Is there a way to prevent it from happening?
Should copy all the macros into a new template, and export all the forms
from the old template and copy them into the new template?
Does anyone have any suggestions?

Thanks for any help. Marceepoo
 
C

Cindy M.

Hi Marceepoo,
A Word template located in the User's Startup folder repeatedly loses
references to DLLs. This causes macros to fail to run, and to generate the
following dialogue box error message: "Compile error: Can't find project or
library". For example, when the ("Compile error:...") dialog box error
message appears, the word "Left" is highlighted on the following line:
strPathTest = Left(strPathDoc, 8)
Each time this occurs, I have to open VBA, click on tools, references, and
then tried to figure out which DLL file got disconnected this time.

Does this mean that the template is corrupt?
What causes this? Is there a way to prevent it from happening?
Should copy all the macros into a new template, and export all the forms
from the old template and copy them into the new template?
Hmmm. The DLL in question would be the basic one for VBA. Searching the
knowledge base turns up the following, which supports your guess that
something may be corrupted.

http://support.microsoft.com/kb/244788/en-us

If the problem is happening with only the one template then yes, try exporting
the macros AND the forms using File/Export in the VB Editor. Create a new
template and use File/Import to bring them in.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
M

Marceepoo

Is it annoying to you MVPs if I (waste your time by) reply(ing) with a "Thank
you"?
marceepoo
 
C

Cindy M.

Hi marceepoo,
Is it annoying to you MVPs if I (waste your time by) reply(ing) with a "Thank
you"?
Nope, no it's not annoying :) At least, not to those of us here in the
office-related newsgroups. We like having confirmation that what we suggested
was (more or less) on target and reached the person asking the question. It also
lets others, looking for help on the same problem, know the information was
helpful.

Cindy Meister
 

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