Share via

DoCmd.SendObject causing Access 2010 to Crash

Anonymous
2016-03-06T19:22:58+00:00

We have an Access Database with which we are trying to send report attachments via Outlook and the DoCmd.SendObject statement. Every time and on every computer we have, execution of the statement causes Access to become unresponsive. Here's some test code that fails every time.

MsgBox "Entered Procedure"

DoCmd.OpenReport "Report1", acViewPreview

DoCmd.SendObject acSendReport, "Report1", acFormatPDF, "******@gmail.com", "", "", "Test of SendObject cmd"

MsgBox "Returned from Outlook"

Outlook does it's function and sends the attachment. However Access never gets control back to display the message box "Returned from Outlook".

What the heck?? Somebody, please help.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2016-09-28T20:37:30+00:00

    We have to keep using Access 2010 because there is no support for .adp files in Access 2013 and Access 2016.

    The Access 2010 DoCmd.SendObject does send the mail with Office/Outlook 2013 and Office/Outlook 2016 installed as well.

    The mail goes through fine but as soon as the command is invoked Access 2010 will freeze and permanently crash.

    I am going to try Microsoft's new method here:

    https://support.microsoft.com/en-us/kb/161088

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-03-12T16:54:19+00:00

    Mor10. I installed Access 2016 to run with my Outlook 2016 and it seems to work fine. So, I think your assessment of the problem is correct.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-03-11T22:25:49+00:00

    I have the same issue, but I have found that the problem is only present if the user have Outlook 2016.  For me it works if the computer has Outlook 2010, but not Outlook 2016.

    If you happen to have Access 2016, the Outlook 2016 will hand back control to Access 2016.  The trap with this is that many users with Outlook 2016 got it trough Office365.  Unless they bought it with Access 2016, you are out of luck, since they don't allow Access 2016 runtime to be installed on the same computer/user that has Office365.  Not a very friendly move by Microsoft, towards independent software developers and the likes.

    For some reason the chaps from Microsoft don't seem to want to deal with this issue.  I have mentioned it in a few different venues, but I either get no response, or told that others will handle it.  As late as yesterday I posted it as a separate question here on this community, but so far there is no takers from within Microsoft or any of the MVP's.  Do they know something we don't?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-03-07T21:44:27+00:00

    Tom, thanks for the help. I went through your recommendations and still no help on the first computer. Then recreated the code on a second computer and it worked fine. I guess I'll have to uninstall and reinstall Office on the first computer. Thanks again

    • Ken

    Was this answer helpful?

    0 comments No comments
  5. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2016-03-06T19:54:09+00:00

    Comment out line 2. Still a problem?

    Run Office Repair from Control Panel > Programs and Features > Office 2010

    Compact the FE and BE

    Decompile the FE

    Try it on another machine. Your code is correct so it must be something specific to the computer.

    Was this answer helpful?

    0 comments No comments