Philosophaie
Member
I have recently upgraded from Office 2010 to Office 2016.
This code in Excel 2016 VBA yields a partial Outlook 2010 screenshot but nothing else. How do I access Outlook 2016 from Excel 2016 VBA:
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = someemail
.Subject = "subject1"
.Attachments.Add "C:\Users\Users\Documents\picture1.jpg"
.HTMLBody = "<html><center><head></head><body><h1>Some text</h1></center></body></html>"
.Display
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
This code in Excel 2016 VBA yields a partial Outlook 2010 screenshot but nothing else. How do I access Outlook 2016 from Excel 2016 VBA:
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = someemail
.Subject = "subject1"
.Attachments.Add "C:\Users\Users\Documents\picture1.jpg"
.HTMLBody = "<html><center><head></head><body><h1>Some text</h1></center></body></html>"
.Display
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing