I built a excel macro using the "Microsoft Outlook 15.0 Object Library" reference, but when I send the file to other people they get this error: "Can’t find project or library".
This file will be used by a lot of people, so I have to add it from VBA Code.
I'm using this code that runs when you open the excel file, which is returning the following error: "Error in loading DLL"
Private Sub Workbook_Open()
Application.VBE.ActiveVBProject.References.AddFromFile "C:\Program Files (x86)\Microsoft Office\Office15\MSOUTL.OLB\"
End Sub
Do you have any idea why this is happening?
Thanks