Email (docmd?)

  • Thread starter Thread starter Rpettis31
  • Start date Start date
R

Rpettis31

Hello, I had a macro that sent an email however the message box in out look
is to small and cumbersome to have a long message.

What I am trying to do is send a message based on values on a form.

For example ( Issue [0001] has been created for item 12345)

I am not sure how I should so this other than an on click event from the
command button I have already set up.

No attachments or reports just some values from the form.
 
Hi Rpettis31,

Try this behind your button and modify the First Name, Last Name etc.. to
fit your needs.

On Error GoTo EH
Dim SendTo As String, SendCC As String, MySubject As String, MyMessage
As String
SendTo = "(e-mail address removed), (e-mail address removed)"
SendCC = "(e-mail address removed), (e-mail address removed)"
MySubject = "Additional Information Needed"
MyMessage = Me.LoanNumber & vbCr & Me.CustomerFirst & " " &
Me.CustomerLast & vbCr & Me.ErrorCode & _
vbCr & Me.Comments
DoCmd.SendObject acSendNoObject, , , SendTo, SendCC, , MySubject,
MyMessage, True

EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If

I've been using this piece of code for three years and never had a problem.
Hope this helps!
 
i'm having problems loading email to windows it says can't connect to
server. Help!
 
i'm having problems loading email to windows it says can't connect to
server. Help!

"Windows" doesn't do EMail. There are many EMail programs which run as
programs in the Windows operating system - Outlook, Outlook Express, Windows
Mail (yes, that's confusing, but it is an application program not the actual
Windows operating system).

All of these programs have forums like this one to help you with problems.
However, this particular forum is NOT for any of those programs, but instead
for the database software Microsoft Access.

Please scroll down the list of subjects and post your question in a newsgroup
supporting your particular mail software. It would help greatly to post the
name and version of the software that you are using, and indicate which server
(Yahoo???) you want to use.
 
Back
Top