Word Interop Application casting error

  • Thread starter Thread starter EruditeBonnie
  • Start date Start date
E

EruditeBonnie

I have a Windows app that uses the Primary Interop Assemblies for Word. It
runs just fine on XP machines. It does not on Vista. The Vista machine is
running Word 2003, so I installed the O2003PIA assemblies. However, I get
the following error when trying to access Word:

Unable to cast COM object of type
‘Microsoft.Office.Interop.Word.ApplicationClass’ to interface type
‘Microsoft.Office.Interop.Word._Application’. This operation failed because
the QueryInterface call on the COM component for the interface with IID
‘{00020970-0000-0000-C0000-000000000046}’ failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).


I am defining my word application object like this:
Word.Application _wordApp = new Word.Application();

I've also tried:
Word._Application _wordApp = new Word.Application(); //can't instantiate a
_Application object)

Both give me the same error.

Is there something special I have to do for Vista?

Bonnie
 
You probably should post this in the following ng for more expert answers:
microsoft.public.word.oleinterop
 
Back
Top