Error:
**
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)).
**
Я занимаюсь разработкой Office с помощью Visual Studio. И получите сообщение об ошибке ниже
[code]Error: ** 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)). ** [/code]
Код: (также на https://gist.github.com/1056809)
[code]if (File.Exists((string)strDocPath)) { Word.Application wdApp = new Word.Application(); wdApp.Visible = true; //Error thrown here