2
votes

I was normally printing through an application that I developed in C # using interop in Office 2013 (Word). I then installed the version of office 2007 and from there, it did not work anymore. This is the exception I have:

     You can not convert the COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' in the interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the IID interface '{00020970-0000-0000-C000-000000000046}' failed due to the following error: Error loading the library / DLL of type. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

I could not solve it, if someone can help me, I thank you.

1
Did you uninstall the version of Office 2013? - I.B
I uninstalled twice already, and reinstalled - Jeterson Miranda Gomes
I had a similar problem once the solution was that having multiple office version cause an empty Registry key that you need to delete do you know how to check the Registry key? - I.B
No, could you please explain, I tried some solutions that I found in the forums, but without success ... - Jeterson Miranda Gomes
The forums I read, all point to problem registry key problem, but I could not solve - Jeterson Miranda Gomes

1 Answers

1
votes

So what is happening is that you have an empty registry key of the higher version and because it always chooses the highest version it takes the empty one.

So you need to go in your registry and delete the empty version. To do that click on the windows icon then type regedit and press enter. You should then see the Registry Editor go in the folder HKEY_CLASSES_ROOT find the folder TypeLib in it and try to locate the key {00020905-0000-0000-C000-000000000046} (It's the Interop.Word key)

Now that you're in it you should have at least 2 folders in it. They should be named 8.X If you click on one you'll see to the right what it contains in one it will only have one line that starts with (Default). That folder is the empty one that you need to delete. Usually the highest folder is the one you need to delete so between 8.6 and 8.7 you should delete 8.7.