Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
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 2:57am
Comments
Richard MacCutchan at 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
0 OriginalGriff 290
1 Jochen Arndt 165
2 DamithSL 125
3 PIEBALDconsult 110
4 Garth J Lancaster 90
0 OriginalGriff 5,790
1 DamithSL 4,601
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,195


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 19 Apr 2013
Copyright © CodeProject, 1999-2014
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