rbarrera05
New Member
- Joined
- Sep 24, 2016
- Messages
- 3
I have a range of table range("A1:B12") in Excel. I was able to send the table to one recipient only.
However, I wanted to send the table to multiple recipient. Emails can be found in column B.
Here's my initial macro code (this code will send the table only send to 1 recipient)
Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A1:E12").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 a sample workshee."
.Item.To = "ryan.c.barrera@ctt.com" 'send to only one recipient
.Item.Subject = "My subject"
.Item.Send
End With
End Sub
However, I wanted to send the table to multiple recipient. Emails can be found in column B.
Here's my initial macro code (this code will send the table only send to 1 recipient)
Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A1:E12").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 a sample workshee."
.Item.To = "ryan.c.barrera@ctt.com" 'send to only one recipient
.Item.Subject = "My subject"
.Item.Send
End With
End Sub