Click here to Skip to main content
12,942,930 members (60,681 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hi All,

Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.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-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002

I am getting this exception at:

((Word._Application)WordApp).Quit();

please give me any suggestion to resolve it..

Thank you..
Posted 3-Dec-12 1:57am
Comments
Richard MacCutchan 19-Apr-13 11:45am
   
You should not be casting to _Application as it is not the same type as your application object.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hi,

Check this link: http://support.microsoft.com/kb/315981/en-us[^]

CType(WordApp, Word._Application).Quit()


Good luck.
JAFC
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Don't know if it will help, but check this post reporting a similar problem:
http://stackoverflow.com/questions/12957595/error-accessing-com-components[^]

Regards.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,633
CHill60 2,880
Maciej Los 2,268
Jochen Arndt 1,900
ppolymorphe 1,755


Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 19 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100