XP Pro VB6 Office 2003 Word Automation Error

R

Rob

I have a program that I wrote in VB6, which launches Word for sales
quotes. It was built to support systems running Windows 98 and Windows
2000. Also, it was built against the least common denominator, Office
97, on Windows 98. It works fine on these systems.

I attempted to load the application on a system running Windows XP
Professional and Office 2003. When the application attempts to launch
Word, it displays the error, "Automation Error. The specified module
could not be found". The error code is 8007007e. This new system was
delivered with XP Professional and Office 2003 pre-installed.

I have isolated the line of code that generates the error.

Set objWord = New Word.Application

This line of code uses early binding, but it was built against Office
97, which uses version 9 of the Word object type library. And it works
on Windows 98 and Windows 2000 machines running Office 97 and Office
2000. I'm not sure what it does with Office 2002.

I see lots of posts with this problem. None of the proposed solutions
have worked. What is the problem with XP Professional and Office 2003?
 
R

RobbDbn

We are doing something very similar to what you are describing where we generate documents from VB by using Word Automation. We are using Word.8 type libraries to ensure compatibility. We have not yet upgraded to Word 2003 but after seeing your message we went ahead and tested our application on Windows XP Pro/Office 2003. It ran without any problems as it does on our current versions. (XP Pro/Office 2002, Windows 2000/Office 97). The only difference that I can see is how we are creating the Word object. We use the following code to either obtain the handle of Word if it is already open or to load Word

Set wdApp = GetObject(, "Word.Application"
If Err.Number <> 0 The
Set wdApp = CreateObject("Word.Application"
WordWasRunning = Fals
End I

Not sure if this will work for you but it seems to work for us.
 
C

Cindy M -WordMVP-

Hi Rob,
I attempted to load the application on a system running Windows XP
Professional and Office 2003. When the application attempts to launch
Word, it displays the error, "Automation Error. The specified module
could not be found". The error code is 8007007e. This new system was
delivered with XP Professional and Office 2003 pre-installed.

I have isolated the line of code that generates the error.

Set objWord = New Word.Application
It should work; Word 2003 certainly supports this syntax.

Did you test this on only one machine, or on a couple? Could be a
problem with the particular installation...

If you have VB6 and Office 2003 installed on a machine, and set up a
new, test project that basically just starts Word, loads a document and
displays it, does that work? And if you take that to the machine you
tried your project on?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :)
 

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