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:
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
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