Unable to cast COM object of Office Interop Word

aiyagaze picture aiyagaze · Mar 12, 2014 · Viewed 12.3k times · Source

My application has a feature to export to Microsoft Word, but it hasn't worked since I've upgraded from Microsoft Office 2010 to Microsoft Office 2013.

Here is the code:

Microsoft.Office.Interop.Word.Application appVersion = new Microsoft.Office.Interop.Word.Application();
appVersion.Visible = false;

and this is the error message:

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)).

Someone told me to edit the registry, but the IID "{00020970-0000-0000-C000-000000000046}" does not exist in my registry.

Answer

cremor picture cremor · Mar 20, 2014

Running a repair installation of Office usually resolves that issue.