0
votes

I created a VBA in Excel 2010 which generates an email. My colleague opened the file in Excel 2016 then saved it. Then I opened the file in version 2010 I get an error message. 'Error in loading DLL' When I check the tools, references, I see 'Missing: Microsoft Outlook 16.0 Object Library'. I lost my all macros in the file. How can I solve this problem?

1
Did you send it by e-mail and therefore have it as an attachment in its old form?QHarr

1 Answers

0
votes

In VBA Editor >>> Tools >>> References:

Deselect the missing Microsoft Outlook 16.0 Object Library and select the reference version installed on your machine.

But to solve this problem for good, you should remove the reference to Outlook, declare the object as Object and use late binding:

Dim app As Object
Set app = CreateObject("Outlook.Application")