Forum Discussion
DS590
Sep 21, 2023Copper Contributor
Sending Email from Access to Outlook (Works with Office Pro Plus 2016)
My company is switching users from Office 2016 to Microsoft 365. I have a database that send emails out to suppliers. The code has worked fine for years. Now, after the upgrade to 365, I now get a...
MariaBarnes
Sep 26, 2023MVP
Can you share the code you are using? Do you have a reference to the Outlook object or are you late binding and using Object type and GetObject or CreateObject?
- DS590Oct 02, 2023Copper Contributor
I found the solution to the problem. It was not related to early or late binding.
I was using outlook.mailitem.to in order to add the email addresses. I guess there was a change and this is no longer valid.
In order to assign email address I found the following code to work. This is not the complete code.
Dim appOL As Outlook.Application
Dim objMail As Outlook.MailItem
Dim Email_Recipient As Outlook.RecipientSet appOL = GetObject(, "Outlook.Application")
If appOL Is Nothing ThenSet appOL = CreateObject("Outlook.Application")End If
With objMail
Set .Email_Recipient = .Recipients.Add(VendorContactEmail).Send
End With