Hi!
I have an .NET app on many machines at customer's office. App is doing some word automation (opening a document and doing a search replacing on some keywords).
Recently one machine was completelly reinstalled with Word 2003 SP3, Windows XP (all updates).
Now I get this exception:
System.InvalidCastExceptio
n: Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'. This operation failed because QueryInterface call on the COM component for the interface with IID '{...}' failed due to the following error: Library not registered (Exception from HRESULT: 0x8002801D (TYPE_E_LIB_NOTREGISTERED)
)
at this line in code:
Word.ApplicationClass WordApp = new Word.ApplicationClass();
I tried to change that to:
Word._Application WordApp = new Word.ApplicationClass();
but of course that didn't work..
Please help !
Start Free Trial