jei eusebio
Member
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!
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!
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