Hi there
I'm looking for a vba code to send email in the body picking up different range of cells from a different sheets:
I.e.: sheet 1 range bp9:bk21
sheet 2 range d14:f100
sheet 3 range ab20:ac40 and so on.
I managed to set a code for the first sheet (range bp9:bk21) and works fine when I open the email on a laptop, but doesn't work when I open the email on mobile, the info it's all over and doesn't make sense.
Code I'm using:
Any help it will be much appreciated.
Regards
Rodrigues
I'm looking for a vba code to send email in the body picking up different range of cells from a different sheets:
I.e.: sheet 1 range bp9:bk21
sheet 2 range d14:f100
sheet 3 range ab20:ac40 and so on.
I managed to set a code for the first sheet (range bp9:bk21) and works fine when I open the email on a laptop, but doesn't work when I open the email on mobile, the info it's all over and doesn't make sense.
Code I'm using:
Code:
Sub SendEmail()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("BK9:BP21").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats 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 = "This is an email test"
.Item.To = "myemail@email.com"
.Item.Subject = "figures"
.Item.Send
End With
End Sub
Regards
Rodrigues
Last edited by a moderator: