Hi
I am using this macro to look up a range of cells in excel to send in an email body but need to change a few things.
The email is to .Display so I can check before sending.
I need it to look at a sheet called 'To Csh Mgt" to select the range of cells.
Also in the body of the email I need it be to the left hand side in the email, at the moment it centre's it.
Finally to put a "Yes" in another worksheet range I152 once the email has been sent
My comments are in green the original comments are in red.
Many thanks in advance.
Sub Send_Range()
' Need this to select the sheet ("To Csh Mgt").
ActiveSheet.Range("B7:D17").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field that adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "Beakdown of Payment"
.Item.To = ThisWorkbook.Sheets("To Csh Mgt ").Range("C1")
.Item.CC = ThisWorkbook.Sheets("To Csh Mgt").Range("C2")
.Item.Subject = ThisWorkbook.Sheets("To Csh Mgt").Range("C3")
.Item.Display
End With
'In worksheet("Checking") , enter a "yes" in cell "I152"
End Sub
Bookmarks