I have an excel vba project that does not work after upgrading from Excel 2003 to 2007. The following code is the part giving me problems. In it I click a button and Outlook is supposed to email a bunch of pdfs from the directory that I choose. After upgrading to Office 2007 I get the following error message.
Run-time error -2147024770 (8007007e):
The specified module could not be found.
Here is the code that is giving me the problem, the error occurs on the middle line.
Dim objSession As Object
Set objSession = CreateObject("mapi.session") run time error occurs here
objSession.Logon profileName:="MS Exchange Settings"
I made sure I have a reference to the Microsoft Office 12.0 Object Library. Any help would be appreciated.