Windows Vista Word Interop Application casting error

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

EruditeBonnie

Guest
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
 
Re: Word Interop Application casting error

You probably should post this in the following ng for more expert answers:
microsoft.public.word.oleinterop
--
Andre
Blog: http://adacosta.spaces.live.com
My Vista Quickstart Guide:
http://adacosta.spaces.live.com/blog/cns!E8E5CC039D51E3DB!9709.entry
"EruditeBonnie" <EruditeBonnie@discussions.microsoft.com> wrote in message
news:7D25ED2C-507F-47D1-8A7B-BADFBF6765BA@microsoft.com...
>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
>
>
>
>
 
Back
Top