none
Email "send object" does not work between MS Access 2016 and Outlook 2016 RRS feed

  • Question

  • Hi All,

    First time user, hope I get it right

    we just upgraded from access 2007 to 2016. prior to upgrade we have a macro that "send object" to out look and worked great.

    if we run the program as accdb in full version works great. if we run in accdr I get error 2046t he command or action "Send Object isn't available now"

    any suggestions or HELP  on how to send an email. I have made sure Outlook is the default email

     ken

    Wednesday, August 24, 2016 2:24 PM

Answers

All replies

    1. What is the 'accdr' extension? Do you mean 'accde'?
    2. How are variables declared? early or late?
    3. Do you run the code on the same machine with accdb and accde?

    Best regards, George

    Wednesday, August 24, 2016 2:38 PM
  • @George,

    1. accdr is an extension that you can give to force runtime mode.
    2.  He mentioned Macro, not VBA.

    @ Kenvista,

    Have you tried performing an Office Repair?
    Your db compiles without any issue?


    Daniel Pineault, 2010-2012 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Wednesday, August 24, 2016 2:48 PM
  • George,

    I am using accdr, accde and accdb for testing.

    I used command button wizard to create the macro, not sure how access creates the variable for this 

    I am testing on the same machine. The program is on 12 computers only using runtime 2013  and none of them work sending email.


    Thanks for the response

    ken

    Wednesday, August 24, 2016 2:54 PM
  • yes,

    Compiles without issue. 

    Wednesday, August 24, 2016 2:56 PM
  • You've created a Trusted Location for the FE on all the PCs?

    And enable VBA automation of Outlook?


    Daniel Pineault, 2010-2012 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net


    Wednesday, August 24, 2016 2:58 PM
  • Thanks Daniel, didn't know about .accdr

    The reason it does not work is because your variables are declared using 'early binding', meaning you need to have a reference declared. With 'late bindings' you don't need that but all your variables concerning Outlook need to be declared as Object (or Variant). You can read more here:

    http://excelmatters.com/2013/09/23/vba-references-and-early-binding-vs-late-binding/


    Best regards, George

    • Marked as answer by Kenvista Wednesday, August 24, 2016 4:31 PM
    Wednesday, August 24, 2016 2:59 PM
  • I will look at your solutions and reply back when checked out.

    thanks,

    Ken

    • Marked as answer by Kenvista Wednesday, August 24, 2016 4:25 PM
    • Unmarked as answer by Kenvista Wednesday, August 24, 2016 4:25 PM
    Wednesday, August 24, 2016 3:01 PM
  • Hi George,

    Thanks for the great help, used the late binding and it works now.

    Ken

    Wednesday, August 24, 2016 4:30 PM