How to send multiple email address through a slicer in excel vba

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.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello and welcome to the Board


  • I am not sure if I understood your request correctly.
  • Do you want a single email to multiple recipients or multiple emails to individual recipients?
  • Where is the email list? At the presentation sheet?

Do you need the code to change the slicer selections? Will it be done manually before clicking the button?
 
Upvote 0
  • I am not sure if I understood your request correctly.


  • Do you want a single email to multiple recipients or multiple emails to individual recipients? YES!
  • Where is the email list? At the presentation sheet? There is an email sheet.


Do you need the code to change the slicer selections? Will it be done manually before clicking the button?


-----------------------------

Currently, when you click on the slicer, it makes that selection.

Bare with me. The company wants me to do this.

I have a slicer. When you select the slicer, the information for the selection shows. From there you can click the email button to send the information to the email address of that selection.


They want me to send each selection with selection information to the selection email address by clicking on a button. So let's say we have 50 selections in a slicer, [each selections 50 = email addresses connected to their own information and attachment] send automatically by one press of a button, only one time.
 
Upvote 0
Here is what I got from your explanation:

  • Each slicer item corresponds to an email list, which is located on a specific sheet.
  • One email has to be sent to all addresses on that list.
  • What is the email sheet layout in terms of row and column arrangement? I need to know this to write the code.
  • Files will be attached to the message. Are the paths also on the email sheet? Again, please inform the exact layout of this sheet.
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,573
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top