Send mail commands in Access VBA no longer work with Outlook 365. Mixed Outlook versions

Hi.  I've been bringing along an old, shared access database that was designed in Access 2000.  There are email send object and OLMail commands sprinkled throughout this thing.  Quite a few years back we moved to office (& Outlook) 2010 and I was able to keep it and all of the email functions working.  Recently, we are starting to move to Office 365 and are in sort of a hybrid state right now.. I have users running Office 2010 (w/Access 2010) and Outlook 2010, other users running office 2010 (& Access 2010) and Outlook 365 and a very few running the full Office 365 suite.   Besides that, I have users on both Windows 7 and on Windows 10.  Luckily, for now; the handful on the full office 365 suite don't use Access but I imagine we'll be moving more users soon.  I expect we'll be slowly moving users to full office 365 over the next couple years due to the number of users and lack of $$ available for this project.

My problem is in sending mail from within Access.  Everything else works fine.  My office and outlook 2010 users don't have an issue as long as the correct outlook object reference is available.  I think my issue is with the users who are using outlook 365.  The send object and OLMail objects don't work.  If I look at the references on various clients, I do see the correct MS Outlook Object Library reference for 14 or 16 based on the outlook client installed on that machine.  I've included my reference lists and a couple email send code examples being used.   What is my best course of action at this point?  I'm trying to steer away from a full redesign if possible..  thanks
Access-VBA-Reference-List.docx

' VBA1 OLMailItem Send Mail  (Error:  Run Time Error 5:  Invalid procedure call or argument)
Private Sub RGReason_LostFocus()
If RGReason = "Lost in Shipment" Then
    'Dim Outlook
    Set Outlook = CreateObject("Outlook.Application")
                    
    Dim Message 'As Outlook.MailItem
    Set Message = Outlook.CreateItem(olMailItem)
    With Message
                
    .Subject = "RG #" & [RGNo] & " created for items lost in shipment."
    .Body = "Gina, please send a copy of Invoice #" & [InvNo] & " to Shawn for Lost Goods.  Thank you."
    .recipients.Add ("sample@domain.com")
    .recipients.Add ("sample2@domain.com")
    .Send
    End With
    MsgBox "Notice of Lost Goods has been issued to UserA and UserB to follow up with the carrier in recovering these goods.", , "Note"
                         
End If
End Sub

Open in new window


'VBA2 SendObject example    (Error:  The Command or action 'SendObject' isn't available now.)
 Dim stDocName As String
stDocName = "CreditMockUp3"
DoCmd.SendObject acReport, stDocName, acFormatPDF, "user@domain.com", , , "Issue Credit for RG No. " & [RGNo], "Credit mock-up attached. See RG# " & [RGNo] & " for more details.  " 

Open in new window

LVL 7
valmaticAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel PineaultPresident / Owner CARDA Consultants Inc.Commented:
Do the users with the issue have outlook installed, configured and fully functional?  They can send/receive e-mails using Outlook?
valmaticAuthor Commented:
Hi Daniel,  Yes,  all users can send and receive email via their Outlook client.
PatHartmanCommented:
I don't believe you can automate the web versions of Office apps.  Is Outlook INSTALLED on the problem PC?  NOT the web app but OUTLOOK itself.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
It must be installed, otherwise you would not have the typelib registered and the reference available in VBA.

Do you get any additional error info besides what you've indicated?

Also, check the application and security event logs for any related errors.

Jim.
valmaticAuthor Commented:
Hi Jim, Sorry so slow to respond.  
Yes, we have the full outlook client on each machine.  Nothing related in logs.  I also cleared my event logs to separate the chaff and nothing new that is related to my issue.  I just get an access message when it hits my send mail code:  "The command or action 'SendObject' isn't available now."  

That said,  another user who is running Windows 10, Office (w/Access) 2010 and outlook 2010 is having trouble with e-mail as well.  Only an issue in the OLMail functions though.  The other sendObject functions seems to work fine for him.  

Is there a better way to handle the emailing from Access that would work better with the various outlook versions?  I know Office 365 can also be tricky because it blows away some of the security settings on every update.  I'm looking into the security aspect but no luck so far.  

thanks
John TsioumprisSoftware & Systems EngineerCommented:
There is always the possibility of using an alternate method of sending email via Access..
Here are two recommendations
1. Vbsendemail (personally i haven't test it but is highly recommended by other experts)
2. CDO (when i used it was working fine...there are some mentions that in newer versions of Exchange there are issues but i haven't got the chance to work with latest Exchange)
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
There's also BLAT, which comes in a dll or command line, and for a commercial product,  FMS's Total Access Emailer

as far as vbSendMail, I've used it for years without issue.   CDO has been depreciated, but still works.

Jim.
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
That aside, this is probably the MAPI bug that was recently introduced, for which I don't think there is any work around for currently.

 Let me double check some of the details on that.

Jim.
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
For the users where this is not working, check the outlook version currently installed.   It started with Version 1811 Build 11029.20079.

Jim.
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Did some checking and Microsoft is still investigating this.   Your only choice is to either:

a. roll back the Office update on the effected machines.

b. Use some other means to send e-mails, which John and I commented on.

Jim.
Daniel PineaultPresident / Owner CARDA Consultants Inc.Commented:
http://www.devhut.net/2018/12/03/access-bug-mapi/

Note that this is not an issue if you are using Access 365, but only if you have Office 365 installed, but are using an older version of Access.
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
and that is what we are dealing with...A2010 and O365 installed for Outlook.

Jim.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
valmaticAuthor Commented:
Thanks all for your input on this.  I'm going to try changing my email object coding 1st and see where that takes me.  No budget for more office365 builds yet but sounds like that request needs to go up the chain...

I'm an old user of this site but have no idea how points are split anymore, if at all, so hope it comes out fairly..
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
We've moved to a process where questions are no longer closed and points are assigned based on you (and others) clicking on "This is the solution" and "This is helpful"

Jim.
Daniel PineaultPresident / Owner CARDA Consultants Inc.Commented:
JIm,

I realize that I was simply supporting your diagnosis with an official quote from Microsoft.  Sadly, no forward movement on this issue in nearly a month.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Office 365

From novice to tech pro — start learning today.