Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendObject Question (Email)

Status
Not open for further replies.

DiamondDust

Programmer
Aug 26, 2002
23
0
0
US
I want to the message text to have line breaks. For example, in the Message Text it Reads "Program Managers," I want to start a new line with "Please update your...". I basically do not want the whole message to word wrap.

DoCmd.SendObject , "", "", "[email@address]", "", "", "Health Management Database (HMDB) - Reminder Reporting Total", "Program Managers, Please update your reporting active member totals for you perspective vendor program(s). Thank you", False, ""
 
DiamondDust,

You should be able to create/dim a variable, and then concantenate the data you want to format it. Leverage off of CDONTS for sending email via SMTP. To create a body message with CR/LF where you want the lines to break, see the following.

Ex.

MyBody = "Attached is the monthly listing of store personnel" & VbCrLf
MyBody = MyBody & " in Excel format. Any questions, contact" & VbCrLf
MyBody = MyBody & "John Q Public at 800-555-5555" & VbCrLf

In the case of CDONTS I would then assign the BODY to this var to create the email body.

ex.
MyCDONTSMail.Body=MyBody

Creating a formatted document in an email from Microsoft Access

Check Google and look for "cdonts" to see other suggestions. Even if you are not using CDONTS or CDOSYS the approach should be the same with other

Hope this helps.
DougCranston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top