Newer version of Word can't use references to older libraries

M

Microsoft

I have several machines with Office 2000 and several with Office 2003... it
will be some time before they are all upgraded to Office 2003.

I have extensive Word templates that reference the older (Office 2000)
object libraries (using early binding).

*Most* of the Office 2003 machines are rumbling along just fine using the
older templates... however, I have three machines that come up with *some*
of those older libraries as MISSING (two have a problem with Outlook ref and
one with Excel ref). I have performed multiple clean installs of Office 2003
(even using the OfficeClean utility), to no avail.

Out of curiosity, I created Word 2003 versions of the templates with
references to current libraries and the problem machines work just fine with
those.

Unfortunately, I do not want to keep two production versions of the
templates going...

Anyone ever seen this? Any thoughts on how to remedy (short of late
binding).

Thanks.

Newt
blhavens @
gee.not.today.yahoo.com
(remove obvious words)
 
T

Tom Winter

That's a toughy. References to Office apps in Word
TEMPLATES can be trickier than in VB6 projects. I've seen a few goofy
things, but they've never really bitten me like that.

One thing I can say is that references don't go backwards very well. I had a
Word template that used objects from a VB6 project. That VB6 project was
compliled referencing Word 2000. When I used the template's macros under
Word 97, Word 97 didn't like seeing the objects from the VB6 project working
with Word 2000 objects. I had to switch my VB6 project to late binding
(basically) so Word 97 wouldn't complain.

Of course that's not exactly your problem!

It sounds like Word is not automatically upgrading the reference from the
2000 apps to the 2003 apps. Not sure why that would happen.

Word templates can get corrupted pretty easily. That might have happened in
some manner. You might want to rebuild your template from scratch. (That's
what I do. I actually have another Word template with macros in it that I
run at design-time, and they actually build the final template that I
deploy. That way I can easily get a fresh template.) Start a new blank
template and copy in your modules, forms, etc. (Export them, then Import
them.) Add the references. Etc. See if that helps. Of course you could just
test it real easy. On YOUR machine just start a blank template and add a
reference to Office 2000 apps. Take that to one of the troubled 2003
machines and see if the reference gets upgraded or comes up missing. If it
gets upgraded OK, you probably have a corrupted template and need to rebuild
them like I said. (Hope that makes sense!)

That's really the only thing I can think of. You might want to consider late
binding as well. The performance usually isn't that bad. Referencing another
application is already going to be slow anyways. Give it a shot and see how
bad it is.

==================

Here's an article that's close to your problem. It also talks about
programatically adding and removing references. You might want to try that.
Don't reference anything, and then have some startup code that adds the
correct references. I've NEVER done anything like that, and I don't know if
it would work. Just a thought.

How to check and remove incorrect project references in the Visual Basic
Editor in Word 2002
http://support.microsoft.com/?kbid=308340

Here's some related code and articles:
http://www.utteraccess.com/forums/access/access1061419.html
http://www.vba-programmer.com/Access_Code/Adding_References_Programatically.txt
http://www.utteraccess.com/forums/showflat.php?Cat=&Number=292958&page=&view=&sb=5&o=&vc=1
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

===============================

Here are some related KB articles, though I don't believe any exatly address
your problem:

PRB: Office 97 Automation Client Fails After Re-compilation with Office 2000
or Later Type Library
http://support.microsoft.com/default.aspx?kbid=242375

INFO: Using Early Binding and Late Binding in Automation
http://support.microsoft.com/kb/245115

INFO: Use DISPID Binding to Automate Office Applications Whenever Possible
http://support.microsoft.com/kb/247579

INFO: Writing Automation Clients for Multiple Office Versions
http://support.microsoft.com/kb/244167

===============

Hope some of that helps. Sorry I couldn't give you more!
 

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