Send Email

B

Brook

I have a form with 10 fields on it pertaining to Customer
Sales. I would like the option to click a button and send
the form data to the saleperson via MS Outlook. Does
anyone have any ideas on the best way to accomplish this?

Brook
 
J

J Arty

Dim EmailTF As String
Dim objOutlk As Object
Dim objMail As Object

EmailTF = "C:\Windows\doc.rtf"

' Send Email with file attached
Set objOutlk = CreateObject("Outlook.Application")
Set objMail = objOutlk.CreateItem(olMailItem)
strMsg = "The attached file contains ......." & vbCrLf
strMsg = strMsg & "hkhkjk.......kkkjkj"
With objMail
.To = "[email protected]"
'.CC = "[email protected]"
.Subject = "type a subject"
.Body = strMsg
.attachments.Add (EmailTF)
.Send
End With


Set objMail = Nothing
Set objOutlk = Nothing
 
Top