[AccessD] Emailing directly from the form

Bob Gajewski rbgajewski at adelphia.net
Thu Sep 23 06:34:43 CDT 2004


Paul

An example (watch wrap) ...

================================================
Private Sub cmdSendMail_AfterClick()
Dim varMailTo As String, varCopyTo As String, varSubject As String, varBody
As String
' Set your values (arbitrary field names, of course)
  varMailTo = txtRecipientEmail
  varCopyTo = txtCCEmail
  varSubject = txtSubject
  varBody = txtBody
  DoCmd.SendObject acSendNoObject, , , varMailTo, varCopyTo, , varSubject,
varBody
End Sub
================================================

Regards,
Bob Gajewski


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Paul Rodgers
Sent: Thursday, September 23, 2004 06:04
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Emailing directly from the form


Brilliant, Lonnie. I haven't done this before, and expected complications.
Thanks very much. Cheers
paul

-----Original Message-----
From: Lonnie Johnson [mailto:prodevmg at yahoo.com]
Sent: 23 September 2004 10:36
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Emailing directly from the form


If you know VBA you can set up a button on your form and in the Click Event
you can use the DoCmd.SendObject command and in the parameters for the
recipient and subject and so on, you can reference a field on your form.

Paul Rodgers <Paul.Rogers at SummitMedia.co.uk> wrote:Is there a simple way to
email from the form, specifying certain fields like
[Name], [Department], [Date] please, Craftsfolk? (I use Outlook and
Access2K)

Cheers
paul

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.767 / Virus Database: 514 - Release Date: 21/09/2004


--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




May God bless you beyond your imagination!
Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us












---------------------------------
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.767 / Virus Database: 514 - Release Date: 21/09/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.767 / Virus Database: 514 - Release Date: 21/09/2004


--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list