Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Word Interop Application casting error

Reply
Thread Tools Display Modes

Word Interop Application casting error

 
 
EruditeBonnie
Guest
Posts: n/a

 
      11-30-2007
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




 
Reply With Quote
 
 
 
 
Andre Da Costa[ActiveWin]
Guest
Posts: n/a

 
      11-30-2007
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...3DB!9709.entry
"EruditeBonnie" <> wrote in message
news:7D25ED2C-507F-47D1-8A7B-...
>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
>
>
>
>



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista bootup error - Application error - explorer.exe - cannot boo SDC Windows Vista Installation 1 02-26-2008 02:10 AM
Files with extension ".doc" should be opened in Microsoft Word Application Venkat Windows Vista Security 2 11-26-2007 09:57 PM
Files with extension ".doc" should be opened in Microsoft Word Application Venkat Windows Vista General Discussion 1 11-24-2007 05:41 AM
Application Error - CD MFC Application has stopped working vinodsp2001@gmail.com Windows Vista General Discussion 0 09-06-2007 04:28 AM
Interop: data between programs vjp2.at@at.BioStrategist.dot.dot.com Windows Vista Installation 0 01-24-2007 09:53 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59