Click here to Skip to main content
15,664,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written a application that uses Excel to create printed reports.
The application works on my desktop. I then created an self loading exe to load it onto other machines. Using the exe I loaded it onto my laptop along with the XML files needed. All worked okay.
However, I then loaded it onto a colleagues machine. When I tried to run the reports I got this error message;

'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

I understand that he has Office 365 the same as my machines.

Any help in showing where I can start looking for a solution.

What I have tried:

Nothing as I have no idea where to start.
Updated 6-Sep-22 5:42am

The DLL is not there. He doesn't have it installed. That's what the error says. There may be an interop library you have installed and he doesn't?
Share this answer
Dave the Golfer 6-Jan-20 17:53pm    
Dave the Golfer 10-Jan-20 6:12am    
When I checked my colleagues PC I found that he had the DLL loaded. But it was in C:\Windows\assembly directory. Whereas, on my PC it was in another directory; C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\
My first thought was to add the sub-directories to his C:\Windows\assembly but his PC would not allow me to create the sub-directories.
Is there a way in Visual Studio 17 to put the DLL in the bin directory and reference it, so I can add the dll to the equivalent directory in Program Files(X86)?
If you remove your 'Microsoft reference'(old or current reference) by Go> Project>Property>References*>Select "Microsoft Office xx Object Library" or/and Microsoft Excel xx Object Library" or/and Microsoft Word xx Object Library" > Click 'remove' button.** Hope your error/problem will be solved.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900