• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Send email via excel

Hi Ninjas,

I got this code that will copy a range from an excel sheet then paste it on a new mail in outlook .. but I would also like to add a message above the picture and for the picture to autofit to window. Thanks in advance! :DD


Sub CreateMail()
Dim rngSubject As Range
Dim rngTo As Range
Dim rngBody As Range
Dim objOutlook As Object
Dim objMail As Object

Set objOutlook = CreateObject("Outlook.Application")
Set objMail = objOutlook.CreateItem(0)

With ActiveSheet
Set rngBody = Range("C2:S7")
End With
rngBody.Copy

With objMail
.To = "xxxxxx.com"
.Subject = "INR Update"
.Display
End With
SendKeys "^({v})", True

Set objOutlook = Nothing
Set objMail = Nothing
End Sub
 
Back
Top