Can't add a reference to the specified file

L

Leigh

Here's one for the Google archive, in case anyone else hits it.

On my development machine, I began getting an error when attempting to
set a reference within a Word VBA module to another Word template. The
error was:

Can't add a reference to the specified file

The template I was trying to set a reference to was one I have been
using for over a year without a problem. My machine gets pretty badly
beaten up while I'm coding and debugging, so no doubt I fried
something. Now here's the strange thing. The template to be referenced
was:

c:\My Programs\Foo\Foo.dot

The precise symptom: start word, hit Alt+F11, open a module, choose
Tools, References, navigate to and select the Foo template. PRANG!
Error.

Exit Word. Rename either the template *or* the folder *or* the folder's
parent, and everything works! E.g.:

c:\My Programs\Foo\FooA.dot -- no problem
c:\My Programs\FooZ\Foo.dot -- no problem

It was only when the template full path was

c:\My Programs\Foo\Foo.dot

that the error occurred. Very bizarre!

I reinstalled MS Office, cleaned the registry of all references to Foo,
but no joy.

It turned out that the problem was somewhere inside my XP profile. When
I logged in as another user, everything worked. I simply renamed my old
profile, then logged in as myself again. Presto! Problem solved. (I had
to harvest my favorites, Start menu, etc. from my old profile, but it
sure beat nuking and rebuilding the machine.
Hope this helps someone else.
 

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