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

Send e-mail notice to a specific person 1

Status
Not open for further replies.

gotnomoney

Technical User
Jul 22, 2003
8
0
0
US
I have a survey form that I would like to include a command button to send a e-mail notice stating a new entry has been saved. Is there a way with code or a macro do do this?
 
On the On Click Event of your button do this:

Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Set objMail = objOutlook.CreateItem(olMailItem)
With objMail
.Recipients.Add ThePerson@MyCompany.com
.Subject = "A New Survey Entery Has been submitted"
.Body = "From Me" & Chr(13) & Chr(13) _
& "Rest of your body here is you like"

.Send

End With
Set objMail = Nothing
Set objOutlook = Nothing

:)WB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top