Click here to Skip to main content
11,413,676 members (51,561 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#2.0
Im using VS 2005 and MS office 2003
_Document oWordDoc = oWordApp.Documents.Open(ref fileName,
                                    ref missing, ref readOnly,
                                    ref missing, ref missing, ref missing,
                                    ref missing, ref missing, ref missing,
                                    ref missing, ref missing, ref isVisible,
                                    ref missing, ref missing, ref missing, ref missing);
Need urgent help to sort out
At this I'm getting error as :
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-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Posted 21-Nov-11 2:21am
Edited 21-Nov-11 2:26am
JF201553.7K
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Check this thread & keep looking there till the solution

C# Word Automation Exception[^]

But based on the partial error message(No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).) I got guesses(by the below threads), you need to repair the MS Office or need to re-register the appropriate dll. Check this for detailed explanation(Actually the below threads are not about MS office but similar type[based on error message]) so give it a try or wait for the answer in above MSDN link

Problem has been solved out.

Actually, the server OS was of older version. So I uploaded the older version of ADODB.dll in bin folder and the problem got solved.

===== Solution =====

After a bit of investigation, I found that the registry is somehow corrupted, and the solution is to re-register DLL.

~ Run [ Command Prompt ] (You will need to use the **Run as administrator** option)
Also check these threads

...... No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).[^]
"Oops!" error when creating documents[^]
  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 404
1 Maciej Los 210
2 Sascha Lefévre 200
3 KARTHIK Bangalore 145
4 ProgramFOX 130
0 Sergey Alexandrovich Kryukov 9,035
1 OriginalGriff 7,387
2 Maciej Los 3,640
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web04 | 2.8.150427.2 | Last Updated 27 Nov 2011
Copyright © CodeProject, 1999-2015
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