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 = "(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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top