Good morning,
Not sure if this belongs here or not but it has to do with outlook and ExceL. I have A script in outlook that when a trigger email is sent by me it runs a macro in an excel spreadsheet that is already open. However, I always get run time error 440 method run of object aplication failed. Any help would be apreciated below is my script in outlook. thanks!
Sub ExcelMacro(MyMail As MailItem)
Dim path As String
Dim eApp As Excel.Application
Set eApp = GetObject(, "Excel.Application")
With eApp
path = "M:\Sam\Ear\Automated Queries\Add-on Promo.xlsm"
eApp.Run "'Add-on Promo.xlsm'!RunAllMacros"
End With
End Sub
Bookmarks