Send Object not returning error

S

S Price

Below is some code I have for a command button. The
problem is I need to know whether the user sent/cancelled
the email. When the user is cancelling the e-mail, it's
not returning an error. Any ideas?

ps. warnings are on

On Error GoTo err_cmdSend_Click

Screen.MousePointer = 11
DoCmd.SendObject acSendNoObject, ,
acFormatTXT, , , , , , True

exit_cmdSend_Click:
Screen.MousePointer = 0
Exit Sub

err_cmdSend_Click:
If Err.Number = 2501 Then
MsgBox "E-mail not sent"
Else
MsgBox Err.Description, vbExclamation, Err.Number
End If
Resume Next
 
C

Cheval

I recommend you create a zzFrmEmail Form in which the
email To: Subject: Body: gets displayed and then the user
clicks either the Send or Cancel buttons. Then you know
for sure. Also look into Redemption with sending emails to
Outlook as it makes life much easier and you can do
anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top