piceceofmind
New Member
- Joined
- Dec 1, 2016
- Messages
- 2
Hello. I need your help.
This is how the single email is sent:
On the tab "Email", there is a slicer and a series on pivot table. You select the name in the slicer and the information will change in the pivot table.
After this change happens, you press a button and it will email the slicer select and a screen shot of the pivot tables.
This works perfectly, but now I need to do bulk emails.
So all the names in the slicer, I need to email a screenshot of the pivot tables by pressing one button.
Here is the code for single:
Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A23:AG60").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 = Sheets("Presentation").Range("AG5").Value
.Item.To = Sheets("Presentation").Range("AH5").Value
.Item.Subject = Sheets("Presentation").Range("AG5").Value
.Item.Send
End With
Sheets("Presentation").Range("A1").Select
End Sub
How can I change it to be email everyone at one time?
Thank in advance.
This is how the single email is sent:
On the tab "Email", there is a slicer and a series on pivot table. You select the name in the slicer and the information will change in the pivot table.
After this change happens, you press a button and it will email the slicer select and a screen shot of the pivot tables.
This works perfectly, but now I need to do bulk emails.
So all the names in the slicer, I need to email a screenshot of the pivot tables by pressing one button.
Here is the code for single:
Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A23:AG60").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 = Sheets("Presentation").Range("AG5").Value
.Item.To = Sheets("Presentation").Range("AH5").Value
.Item.Subject = Sheets("Presentation").Range("AG5").Value
.Item.Send
End With
Sheets("Presentation").Range("A1").Select
End Sub
How can I change it to be email everyone at one time?
Thank in advance.