Send report as text in body of email

E

EddieTheHat

I have an Access database to track registrations for a convention. I can send
email confirmations to those who register by attaching a report as RTF (i.e.
DoCmd.SendObject) but I would really like to do is to send the report
information as text in the BODY of the email. Is this possible for an amatuer
like me?
Thanks
 
C

Clifford Bass

Hi Eddie,

To do it entirely in the body, skip the report as attachment and just
create the text of the body to include the pertinent information. I don't
think it allows for formatted (HTML) body text.

DoCmd.SendObject acSendNoObject, , , "toaddress", , , "subject", _
"Dear " & [LAST_NAME] & "," & vbCrLf & "blah blah blah" & vbCrLf & "Your
registration received on " & [DATE_RECEIVED] & ", etc."

If needed construct the body in a string variable part by part
beforethe SendObject command.

strBody = "Dear " & [LAST_NAME] & "," & vbCrLf
strBody = strBody & "blah blah blah, etc."
strBody = strBody & "more blah blah blah, etc."

Hope that helps,

Clifford Bass
 
M

Mark Andrews

You could do this method with a third party SMTP dll. Most support text and
HTML email formats.

I think someone mentioned this one is on the lower cost end and works fine:
http://www.ostrosoft.com/smtp_component.asp

I've used ASPMail (www.serverobjects.com) a few years back

Lots of SMTP components out there.

You could create pdf files and attach (if that works better than the rtf).

I think http://www.fmsinc.com/ also makes a product to build emails in a
similar method.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com




Clifford Bass said:
Hi Eddie,

To do it entirely in the body, skip the report as attachment and just
create the text of the body to include the pertinent information. I don't
think it allows for formatted (HTML) body text.

DoCmd.SendObject acSendNoObject, , , "toaddress", , , "subject", _
"Dear " & [LAST_NAME] & "," & vbCrLf & "blah blah blah" & vbCrLf &
"Your
registration received on " & [DATE_RECEIVED] & ", etc."

If needed construct the body in a string variable part by part
beforethe SendObject command.

strBody = "Dear " & [LAST_NAME] & "," & vbCrLf
strBody = strBody & "blah blah blah, etc."
strBody = strBody & "more blah blah blah, etc."

Hope that helps,

Clifford Bass

EddieTheHat said:
I have an Access database to track registrations for a convention. I can
send
email confirmations to those who register by attaching a report as RTF
(i.e.
DoCmd.SendObject) but I would really like to do is to send the report
information as text in the BODY of the email. Is this possible for an
amatuer
like me?
Thanks
 
E

EddieTheHat

Thank you gentlemen.
They got me running in another directions but that looks like it should do it.
I'll try it ASAP.

Clifford Bass said:
Hi Eddie,

To do it entirely in the body, skip the report as attachment and just
create the text of the body to include the pertinent information. I don't
think it allows for formatted (HTML) body text.

DoCmd.SendObject acSendNoObject, , , "toaddress", , , "subject", _
"Dear " & [LAST_NAME] & "," & vbCrLf & "blah blah blah" & vbCrLf & "Your
registration received on " & [DATE_RECEIVED] & ", etc."

If needed construct the body in a string variable part by part
beforethe SendObject command.

strBody = "Dear " & [LAST_NAME] & "," & vbCrLf
strBody = strBody & "blah blah blah, etc."
strBody = strBody & "more blah blah blah, etc."

Hope that helps,

Clifford Bass

EddieTheHat said:
I have an Access database to track registrations for a convention. I can send
email confirmations to those who register by attaching a report as RTF (i.e.
DoCmd.SendObject) but I would really like to do is to send the report
information as text in the BODY of the email. Is this possible for an amatuer
like me?
Thanks
 

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