Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Vista Community > Windows Vista

Windows Vista Discuss the different versions of Windows Vista, Fuji, or Vienna



Reply
 
LinkBack Thread Tools
  #1  
Old 11-30-2007, 10:40 AM
EruditeBonnie
Newsgroup Contributor
 
Posts: n/a
Word Interop Application casting error

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




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 11-30-2007, 10:40 AM
  #2  
Old 11-30-2007, 12:20 PM
Andre Da Costa[ActiveWin]
Newsgroup Contributor
 
Posts: n/a
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: [url]http://adacosta.spaces.live.com[/url]
My Vista Quickstart Guide:
[url]http://adacosta.spaces.live.com/blog/cns!E8E5CC039D51E3DB!9709.entry[/url]
"EruditeBonnie" <EruditeBonnie@discussions.microsoft.com> wrote in message
news:7D25ED2C-507F-47D1-8A7B-BADFBF6765BA@microsoft.com...[color=blue]
>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
>
>
>
>[/color]


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

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 Off
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application Error - CD MFC Application has stopped working vinodsp2001@gmail.com Windows Vista 0 09-05-2007 08:30 PM
Word 2003 Application Error Adde Microsoft Office 2 05-05-2007 02:50 PM
PlaySound via Interop Is Silent on Vista -- Sounds Good on W2K William McIlroy Windows Media 2 02-04-2007 09:46 AM
"could not load file or assembly 'microsoft.interop.mapi.impr' or. johnandkel Microsoft Office 0 01-28-2007 01:30 PM
ms word error leads to closure of the application Sharad Microsoft Office 4 01-15-2007 10:19 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 01:58 AM.


2003 - 2010 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0