Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Mon, 3 Dec 2007 07:25:01 -0800,    group: microsoft.public.word.oleinterop        back       


Word Interop Application casting error in Vista   
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
date: Mon, 3 Dec 2007 07:25:01 -0800   author:   EruditeBonnie

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us