Unable to cast COM object of type'System.__ComObject' tointerface type 'Microsoft.Office.Core.IRibbonUI'.This operation failed because theQueryInterface call on the COM componentfor theinterface with IID'{000C03A7-0000-0000-C000-000000000046}' failed due to the following error: could not be found.(Exceptionfrom HRESULT:0x80030002(STG_E_FILENOTFOUND)).
at Microsoft.Office.Core.IRibbonUI.InvalidateControl(StringControlID)
Problem found!
I have previous installed the Office 2010, so there are some inconsistence on Windows Registry. To fix, open theregedit
and find for the CLSID on the error.
Do you will find something like that for the second error:
HKEY_CLASSES_ROOT\Interface\{00020970-0000-0000-C000-000000000046}
With the subkeys:
- ProxyStubClsid
- ProxyStubClsid32
- TypeLib
Take note of the (Default)
and Version
values inside ofTypeLib
.
Now find the node bellow, using the (Default)
value as <TypeLib ID>
.
HKEY_CLASSES_ROOT\TypeLib\ <TypeLib ID>
\
As child of this elements you will find more than one element, one of then is theVersion
of the first registry. If you inspect the others elements, you will find that they point to nothing.Remove the others!!! It's solved!