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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use the "SendObject" Method to send E-mail

Access Howto:

How to use the "SendObject" Method to send E-mail

by  DougP  Posted    (Edited  )
This just sends a simple text message to a anyone In or outside the building (e-mail)
We use Exchange Server and Outlook for our Mail.

So in my example "ChrisC" is in our building.
But you could send to anyone with a valid e-mail like someone@yoursite.com

DoCmd.SendObject acSendNoObject, "", acFormatTXT, "ChrisC", , , "---------HOT ORDER-------", Redinfo, False

The "False" on the end, sends it right out without user intervention. "True" on the end, will pop up Outlook and let you send it manually or add to it, or...

This example is used to tell Chris that a Hot order has just been made and he needs to make sure it goes out UPS RED or FEDEX. So throughout the day as orders were made if they were to ship overnite then he got this e-mail.

NOTE: Outlook 2000 and newer will stop and ask if you want it to send an email that another program started. This is annoying. NO fix either. Thank all the viruses around. Microsoft had to put in something to stop them from sending emails and it thinks Access is trying to send a malicious email. So this worked great until 2001.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top