Problems running macros due to migration from Windows XP Excel 2007 to Windows 7 Enterprise Excel 2010
Posted on 2013-11-11
I used to be able to run the following macro in Excel 2007 but can no longer in Excel 2010.
Dim olApp As Outlook.Application, olMail As Outlook.MailItem
Dim rngeSend As Range, strHTMLBody As String
Application.DisplayAlerts = False
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)
.SentOnBehalfOfName = "xxxxx"
.To = "xxxxx"
.Subject = "xxx"
I get the following error message in relation to olMailItem
Can't find project or library
Could someone please assist?