Email SendObject Code Not Working

C

CJ

Hi Groupies

I have a form that lists all of my potential email recipients, allows me to
enter a subject and text message. Unfortunately, I get an "Outlook cannot
send this email" error message when I push the command button to make it
run.

Can somebody please take a look and help me out. Code is not my strength....

Private Sub cmdSendEmail_Click()
On Error GoTo Err_cmdSendEmail_Click

Dim strContacts As String
Dim strSubject As String
Dim strMessage As String

strContacts = Me.lstContacts & vbNullString
strSubject = Me.txtSubject & vbNullString
strMessage = Me.txtMessage & vbNullString

DoCmd.SendObject acSendNoObject, , , strContacts, , , strSubject,
strMessage

Exit_cmdSendEmail_Click:
Exit Sub

Err_cmdSendEmail_Click:
MsgBox Err.Description
Resume Exit_cmdSendEmail_Click

End Sub
 
C

CJ

Hi Alex

I don't believe the problem has anything to do with security. It does not
appear to be that kind of warning.

Any other suggestions?
 
C

CJ

Hi Alex

Absolutely nothing wrong with outlook on this computer. It sends and
receives with no trouble.
I think my code was incomplete.

I am working with some code that I found on Arvin Meyer's download page.
Thanks Arvin!! http://www.datastrat.com/Code1.html

I will start a new thread if I have any more trouble.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Alex Dybenko said:
Hi,
but can you send message using outlook manually? is it really configured
to send emails?

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

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