Word 2000 and vb.net 2005

Adagio

Well-known member
Joined
Dec 12, 2005
Messages
162
Programming Experience
Beginner
I'm almost going insane here. I've been spending lots of time searching for a solution, but haven't had any luck at all

In my application I have the need to be able to edit doc files. It works fine on my Vista machine with Office 2007 installed, but on my XP machine with Office 2000 installed I get the following error:

Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).

The code looks like this:

Dim wordApp As New Word.Application
Dim wordDoc As Word.Document = wordApp.Documents.Add

The exception is thrown in the second line


In my application I'm also using Excel, where my code works great for both 2000 and 2007
 
I'm compiling on both computers

After doing some testing today it seems like the problem might be related to the WinXP computer (probably something in the registry). I just did I quick test on a program compiled on the WinXP computer (which doesn't work on that computer), transfered the files to another WinXP computer (without VS installed) and with Office 2000 only. And here the small test worked
But I did have Office 2003 installed before (just uninstalled it and installed Office 2000). I have yet to test it on a machine that has only had Office 2000 installed
 
Back
Top