[FAQ's: OD] How do I send an email or email an Access Object?
You can easily send emails out from Access, either sending an Access Object like a Report or just with text. The DoCmd object has a method called SendObject. You can pass several object types like, a Form, Report, Query, Table, Module, Data Access Page, or no object at all (just text).
Using SendObject to just send some text in the email:
VB Code:
Application.DoCmd.SendObject acSendNoObject, , acFormatTXT, "
[email protected]", , , "Spam", "This is the message text", False
Using SendObject to send an Access Object:
VB Code:
Application.DoCmd.SendObject acSendReport, "Report1", acFormatTXT, "
[email protected]", , , "Spam", "This is the message text", False
If you want to present the email so the user can make any edits or additions then just change the last parameter to True.
Happy Spamming :)