Office 12 MSWORD.OLB missing from Office 10 under XP

E

Ed Sowell

I have an Excel VBA project that launches Word for some tasks like making
mailing labels. I am doing my development work on a Vista machine using
Office 12. When I try to run it on another machine using XP Pro with Office
10 I get Missing library error messages. Changed it over to late binding,
but no help. It seems happy with what it can find in the Office 10
libraries, but there is something that makes it insist on Word 12 object
libraries, which gets marked as MISSING among the References, which maps to
MSWORD.OLB. Snooping around I found on the XP machine C:\Program
files\microsoft office\Office 12, but there is no MSWORD.OLB in it. So, I
copied one over from my Vista-Office 12 machine, and it works!

But, I am a little bit uneasy about this. For one thing, I don't imagine one
is supposed to be doing that because of licensing issues. I'm not too
worried about that, however, because the single user of the software does
have a licensed Office 10. I'm more concerned about
(a) why I should have to do this. I don't think I'm using any exotic
features only available in Office 12. As a matter of fact, I did the
original development on the very machine and software that it now won't work
on! (b) are there any technical issues lurking here? That is, when I put
this on my user's machine will it mess up his use of Word 2000?

Any help greatly appreciated.

BTW, I got some suggestions in the Excel programming news group, but no
answers to the above questions. They suggested I bring it over here.

Ed
 
P

Paul Shapiro

The problem is that you can develop on Office 10 and then open in Office 12,
because the later Office version knows how to update VBA references from
older Office versions. But go backwards requires manual fixup. And you are
correct that simply copy the olb file might satisfy the compiler but it
won't run that code successfully.

Open the VBA editor and on the Tools menu open the References. Clear the
MISSING reference to Word 12 and then you can select Word 10 as a reference.
Make sure the code compiles. Unless an object is specifically declared as a
Word12 version, or uses any features that didn't exist in Word 10, it should
be fine.

I find the most reliable way to develop for older versions than my own
development machine is to setup a virtual machine on Virtual PC with the
oldest OS and Office versions used by any of my clients. I do the final
setup on that virtual machine before distributing to clients. In your case,
I guess that would be WinXP and Office 10.
 
E

Ed Sowell

Thanks Paul,

I can understand what you are saying, but I tried the precedure you are
suggesting and it did not work. I removed all the references I could in the
Vista/Office 12 environment, saved, and moved to the XP/Office 10
environment. It still found Office 12 MISSING. I unchecked it and searcehd
for and checked Office 10 for the Word library. No joy. wnen I tried to
compile (on XP/office 10 machine) it still said it REALLY wanted the Office
12 version. And, it SEEMS to work when I seripticiously give it the
MSWORD.OLB from the Vista\Office 12 machine.

Or, are you suggesting that I force it to use Office 10 on the Vista
machine? Haven't tried that.

Ed
 
P

Paul Shapiro

You have to adjust the references on a machine with Office 10 installed. You
can't do it on the Office 12 machine. That's why I use a virtual machine to
prepare code for lower-level clients.
 
E

Ed Sowell

Paul,

Well, that's what didn't work.
a) I copy the .xls & .xla files to the XP/Office 10 machine.
b) I open the xls and enable the addin. It finds Office 12 Word library
missing.
c) I uncheck it and check Office 10 Word
d) it still finds Office 12 Word missing.

But, if I also move MSWORD.OLB over the the XP/Office 10 machine, then it
works. Or it seems to.

Ed
 
D

Doug Robbins - Word MVP on news.microsoft.com

What happens when you compile it on the Office 10 machine? Does a
particular line of code cause get highlighted?

If you show us the code that you have, we may be able to spot something.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
P

Paul Shapiro

If the .xla is an addin library being used by the .xls, did you also update
the references in the .xla? And verify that it compiles?
 
E

Ed Sowell

Paul,

Yes, it's an Addin and I did TRY to update it. As I said in my last note,
it fails to compile due to missing reference to Office 12 Word.
I unchecked that MISSING item, searched for and found OFFICE 10 Word, and
checked it. Is that what you mean by updating?

Ed
 
P

Paul Shapiro

Yes. Unless the add-in uses some new object model feature not available in
Office 10, that should fix it. Once you update the reference to Office
10/2000, the compile still fails? And if you check the references, it still
shows the Office 10 version, nothing about Office 12/2003? Any other missing
references? Any 3rd party references?
 
E

Ed Sowell

Paul,

Once you update the reference to Office 10/2000, the compile still fails?
Yes
And if you check the references, it still shows the Office 10 version,
nothing about Office 12/2003? Yes
Any other missing references? No
Any 3rd party references? No

I'm going to have to just use the MSWord.lb from my Vista/Office 2007
installation for now.

Thanks.

Ed
 
E

Ed Sowell

Paul,

I found another problem with moving between Office 12 and 10. Has nothing to
do with Word, but thought you might be interested.
It is that Excel in Office 12 has a Sort method for the Worksheet object
that is missing from 10. I learned this when I found that
wksMyWorksheet.Sort would not compile. I then recorded a macro on both
Office 10 and 12 and saw that 10 uses a Sort method of
Selection. The latter also works on 12, so I changed my code to the 10 way
of doing things.

This did not get me out of the fire regarding the need for moving MSWord.OLB
from Office 12 to the Office 10 machine.

Ed
 

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