Email Macro-using range for email address,ccc,bcc,subject and body.Office Outlook as email

P

Paul Morgan

Has anyone an Easy Email Macro for Excel?
I want to use ranges as the Email address,cc.bcc.subject and body.

Thanks.
 
D

davesexcel

Code:
Sub SendEmail()
Dim OutlookApp As Object
Dim mItem As Object
Dim Cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Body As String
Dim cc As String
Dim bcc As String

Set OutlookApp = CreateObject("Outlook.Application")

EmailAddr = Range("B1")
cc = Range("B2")
bcc = Range("B3")
Subj = Range("B4")
Body = Range("B6")

Set mItem = OutlookApp.createitem(0)

With mItem
.To = EmailAddr
.Subject = Subj
.Body = Body
.cc = cc
.bcc = bcc
.display
' .send   'use this when you want to send.
End With

ExitPoint:
Set OLMsg = Nothing

End Sub

An example of the workbook can be found here.
http://www.davesexcel.com/emailfromexcel.htm
 
M

mfield2574

Has anyone an Easy Email Macro for Excel? I want to use ranges as the Email address,cc.bcc.subject and body. Thanks.

Is there a way to attach files to this mail item?
Thanks! :)
 

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