Share via

"The command SendObject isn't available now" while tryng to create an email on Outlook 2016

Anonymous
2016-10-19T07:21:31+00:00

Hello, as the title says i have a problem with Access Runtime 2013 and 2010 as well with Outlook 2016.

I have a database that have a function that send several precompiled emails to Outlook, it all worked well with the complete versions of Access, from 2007 to 2016.

But now i switched the full version to a Runtime version on the client and this pop up started to appear when tryng to use the send function.

If i try to run the function on my Office 365 it all works well but when i go to this client and try to launch the same function the message appear.

I tryed Access Runtime 2010 and 2013 and still have the error, and i cannot install the 2016 Runtime because the Office on the client is a click-to-run version and when i try to install the 2016 Runtime it says it isn't compatible with this type of Office installation.

Its an old code wrote by the man before me but it worked well untill now

Here is the function:

Function InviaSmsDaQry()

On Error GoTo InviaSmsDaQry_Err

Dim DB As Database

    Dim RST As Recordset

    Set DB = CurrentDb

    Set RST = DB.OpenRecordset("qrySmsCalcolo2", dbOpenDynaset)

    RST.MoveFirst

    Do While Not RST.EOF

       Set MM = RST!SmsMail

       Set TT = RST!SmsTesto

       If Not IsNull(MM) Then

          DoCmd.SendObject , , , MM, , , , TT, False

       End If

       RST.MoveNext

    Loop

    RST.Close

InviaSmsDaQry_Exit:

    Exit Function

InviaSmsDaQry_Err:

    MsgBox Error$

    Resume InviaSmsDaQry_Exit

End Function

Thanks for the 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

3 answers

Sort by: Most helpful
  1. Anonymous
    2016-10-24T08:32:08+00:00

    1: Yes

    2: Yes

    3: How to do so?

    Also tryed in another PC with Office 2016 installed and Access Runtime 2013 and the command make Ms Access to crash, i think is in incompatibility with the Runtime and Office 2016.

    Today i will try to unistall the Office suite and install the 2016 Access Runtime and then re-install Office 2016 and try again. 

    Edit: Unistalled Office 2016 C2r and installed the Access 2016 Runtime and still got the error, i think i need to rewrite all the code of this function.

    There is a newer method for send emails from an Access routine? if this question is not appropriate to this forum please redirect me to the proper one.

    Thanks

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-10-19T15:52:22+00:00

    Outlook is installed and has a properly configure account?

    Your code compiles without error?

    You created a trusted location for the database Front-End?

    I'd also perform an Office Repair!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-10-19T15:31:07+00:00

    Hi Giulio,

    The concern that you have is already out of the scope of support of this forum. We highly suggest you to post your query in out TechNet Forum to get better assistance under the category of Outlook IT Pro Discussions.

    Let us know if there's anything else we can do to help.

    Was this answer helpful?

    0 comments No comments