Peter's
Software
|
|
|
Send an E-Mail Message from MS AccessIt's easy! You need an e-mail program that uses MAPI, like Outlook Express. Put this code in a command button OnClick event procedure:
DoCmd.SendObject _
, _
, _
, _
"ToJohn@doe.com", _
, _
, _
"Subject", _
"Message", _
False
The above example will put an e-mail message to "ToJohn@doe.com" into your Outbox. To have the e-mail send window pop up, change the last parameter to "True". To send to more addresses, separate the addresses with a semicolon.
DoCmd.SendObject _
, _
, _
, _
"ToJohn@doe.com;ToBill@doe.com", _
"CcMary@doe.com", _
"BccSue@doe.com", _
"Subject", _
"Message", _
False
DoCmd.SendObject _
acSendReport, _
"Sales By Order", _
acFormatRTF, _
"ToJohn@doe.com", _
, _
, _
"Subject", _
"Message", _
False
The "acFormatRTF" parameter will send the report output in a format that can be read by MS Word. You can also use:
|
|||