Send Email

  • Thread starter Thread starter Brook
  • Start date Start date
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
 
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 = "(e-mail address removed)"
'.CC = "(e-mail address removed)"
.Subject = "type a subject"
.Body = strMsg
.attachments.Add (EmailTF)
.Send
End With


Set objMail = Nothing
Set objOutlk = Nothing
 
Back
Top