Outlook email message from a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I have researched in the forum and successfully created a command button to
open outlook, populate the send to field, and the subject line. I want to
take a string built from selections on the form, and insert into the
body/message of the email.

How can I insert a message?

Thank you!
Renee
 
Which method did you use to send emails

One method
Dim SendTo As String ,MySubject As String, MyMessage As String
SendTo="(e-mail address removed)"
MySubject = "Title"
MyMessage = Me.Field1Name & " " & Me.Field2Name
Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage
 
Friend,

joel-ange sitbon has invited you to join GreenZap and get $50 WebCash to
spend online. Sign up for a FREE GreenZap account and get $50 to spend at
hundreds of the world's premier merchants, many of whom are offering
incredible upfront discounts. Click on the link below to go to GreenZap and
signup! All thanks to joel-ange sitbon.

It's Zappening in the GreenZap Storez.
http://www.greenzap.com/joel1962

If you do not want to receive these emails in the future click the link
below:
http://www.greenzap.com/optout_invite.asp
 
I was using a hyperlink field with a Mailto: beginning instead of http:
I like your solution better, thank you!

Now when I click the button the email message opens and populates everything
perfectly, so all I do is click send. Is there a way to have it simply send?
 
Yes, add False in the End of the line, which mean you don't want to edit, if
no value selected it assume that its True, and this is why it opens the
message, for you to edit it


Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage, False
 
Thank you Ofer!

Ofer said:
Yes, add False in the End of the line, which mean you don't want to edit, if
no value selected it assume that its True, and this is why it opens the
message, for you to edit it


Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage, False
 
Hi Ofer:

I've been frustrated because I posted another message reference responding
to a class registation email by clicking on a button and sending an email
confirmation to the student who sent the original email. So far I've received
only one reply and that solution was very complex and didn't work. I
appreciated the response but I need more help.

I'm trying your solution and it's seems to work well in terms of what we
need, sending one email message. However, I have two questions for you.

[1] My co-worker asked if we could format the Outlook 2003 message using
Rich Text?

[2] The user's email address, which is the one we want to insert in our
email confirmation reply, isn't on the form where we register the student.
It's actually stored in tblStudents.

Would it be OK to add the Student_Email field to the child table, adjacent
to the StudentID field so we can capture the address on the form? Or is there
a way to look up the email address in tblStudents, capture that info, and use
it for our email response?

Thanks,
Robert
 
I posted an email related query but no joy so far and you seem to be good so
maybe you could help me.

I have a macro that generates an email to be sent to me so that when a user
submitts a form, I have embedded it in the submit button. When I test it on
my PC it works fine but when I use a differnt PC I get an error message and
if any of my colleagues tries it they get the ame error message thei is the
macro

Line1: Action - OnError ,Argument - Next,
Line2: Action - SendObject, Argument: , , , (e-mail address removed), , ,
=[Fname] & " " & [Sname], =[Accesstxt] & " " & [Fname], No,
Line3: Conditin - [MacroError].[Number]<>0, Action - MsBox, Argument -
=[MacroError].[Description], Yes, None,


Where have I gone wrong


Thanks in advance
 
Knowing what the error message is would help...

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


LindaBee said:
I posted an email related query but no joy so far and you seem to be good
so
maybe you could help me.

I have a macro that generates an email to be sent to me so that when a
user
submitts a form, I have embedded it in the submit button. When I test it
on
my PC it works fine but when I use a differnt PC I get an error message
and
if any of my colleagues tries it they get the ame error message thei is
the
macro

Line1: Action - OnError ,Argument - Next,
Line2: Action - SendObject, Argument: , , , (e-mail address removed), , ,
=[Fname] & " " & [Sname], =[Accesstxt] & " " & [Fname], No,
Line3: Conditin - [MacroError].[Number]<>0, Action - MsBox, Argument -
=[MacroError].[Description], Yes, None,


Where have I gone wrong


Thanks in advance
Ofer said:
Yes, add False in the End of the line, which mean you don't want to edit,
if
no value selected it assume that its True, and this is why it opens the
message, for you to edit it


Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage, False

--
Please respond to the group if your question been answered or not, so
other
can refer to it.
Thank you and Good luck
 
RUN TIME ERROR 2293 ACCESS APPLICATION CANNOT SEND THIS EMAIL MESSAGE

Thanks again

Douglas J. Steele said:
Knowing what the error message is would help...

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


LindaBee said:
I posted an email related query but no joy so far and you seem to be good
so
maybe you could help me.

I have a macro that generates an email to be sent to me so that when a
user
submitts a form, I have embedded it in the submit button. When I test it
on
my PC it works fine but when I use a differnt PC I get an error message
and
if any of my colleagues tries it they get the ame error message thei is
the
macro

Line1: Action - OnError ,Argument - Next,
Line2: Action - SendObject, Argument: , , , (e-mail address removed), , ,
=[Fname] & " " & [Sname], =[Accesstxt] & " " & [Fname], No,
Line3: Conditin - [MacroError].[Number]<>0, Action - MsBox, Argument -
=[MacroError].[Description], Yes, None,


Where have I gone wrong


Thanks in advance
Ofer said:
Yes, add False in the End of the line, which mean you don't want to edit,
if
no value selected it assume that its True, and this is why it opens the
message, for you to edit it


Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage, False

--
Please respond to the group if your question been answered or not, so
other
can refer to it.
Thank you and Good luck



:

Which method did you use to send emails

One method
Dim SendTo As String ,MySubject As String, MyMessage As String
SendTo="(e-mail address removed)"
MySubject = "Title"
MyMessage = Me.Field1Name & " " & Me.Field2Name
Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage

--
Please respond to the group if your question been answered or not, so
other
can refer to it.
Thank you and Good luck



:

Hello all,

I have researched in the forum and successfully created a command
button to
open outlook, populate the send to field, and the subject line. I
want to
take a string built from selections on the form, and insert into the
body/message of the email.

How can I insert a message?

Thank you!
Renee
 
Thanks for responses the problem has been sortd

LindaBee said:
RUN TIME ERROR 2293 ACCESS APPLICATION CANNOT SEND THIS EMAIL MESSAGE

Thanks again

Douglas J. Steele said:
Knowing what the error message is would help...

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


LindaBee said:
I posted an email related query but no joy so far and you seem to be good
so
maybe you could help me.

I have a macro that generates an email to be sent to me so that when a
user
submitts a form, I have embedded it in the submit button. When I test it
on
my PC it works fine but when I use a differnt PC I get an error message
and
if any of my colleagues tries it they get the ame error message thei is
the
macro

Line1: Action - OnError ,Argument - Next,
Line2: Action - SendObject, Argument: , , , (e-mail address removed), , ,
=[Fname] & " " & [Sname], =[Accesstxt] & " " & [Fname], No,
Line3: Conditin - [MacroError].[Number]<>0, Action - MsBox, Argument -
=[MacroError].[Description], Yes, None,


Where have I gone wrong


Thanks in advance
:

Yes, add False in the End of the line, which mean you don't want to edit,
if
no value selected it assume that its True, and this is why it opens the
message, for you to edit it


Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage, False

--
Please respond to the group if your question been answered or not, so
other
can refer to it.
Thank you and Good luck



:

Which method did you use to send emails

One method
Dim SendTo As String ,MySubject As String, MyMessage As String
SendTo="(e-mail address removed)"
MySubject = "Title"
MyMessage = Me.Field1Name & " " & Me.Field2Name
Docmd.SendObject acSendNoObject,,,SendTo,,,MySubject,MyMessage

--
Please respond to the group if your question been answered or not, so
other
can refer to it.
Thank you and Good luck



:

Hello all,

I have researched in the forum and successfully created a command
button to
open outlook, populate the send to field, and the subject line. I
want to
take a string built from selections on the form, and insert into the
body/message of the email.

How can I insert a message?

Thank you!
Renee
 
Back
Top