|
| | |||||||
| Windows Vista Discuss the different versions of Windows Vista, Fuji, or Vienna |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| 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 |
| |
|
#2
| |||
| |||
| 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] |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| 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? |