Hello!
I have a new problem, after years of my email function working properly, after upgrading to Office 365 2016, I can no longer send emails from any of my apps. Sample db attached. References are set to Microsoft Outlook 16.0 Object Library. Code is:
Code:
Dim olApp As Object
Dim objMail As Object
Set olApp = CreateObject("Outlook.Application") 'Create a new instance of Outlook
'Create e-mail item
'Set objMail = olApp.CreateItem(olMailItem)
Set objMail = olApp.CreateItem(0)
With objMail
'Set body format to HTML
'.BodyFormat = olFormatHTML
.bodyformat = 2
.To = Me.emailaddress
.SentOnBehalfOfName = "chris@ABCmoving.com"
.Subject = "Thank you for choosing ABC Moving"
.HTMLBody = "Testing body of email function "
.Save
.send
End With
Error highlights here: "Set objMail = olApp.CreateItem(0)" Error message is: Run-time error 2147467259 (800004005) You don't have permission to create an entry in this folder. Right click the folder, bla bla bla.
I've tried running Access as administrator, to no avail. Running Windows 10, Access 2016. (Office 365, 2016)
Database6.zip