<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>Hello everyone,
<o> </o>
Thanks for taking the time to look into my question!
<o> </o>
The below code works well for e-mailing sheet to different e-mail addresses that are identified in the code. As well as e-mailing multiple sheets for a particular e-mail address.
<o> </o>
My issue is the e-mail addresses have to be maintained in the code I would like to change this to refer to a located on a sheet “email”.
<o> </o>
The code would check column “C1:C100” if “yes” then it would use the address in column “D” and send sheets identify in (“E:Z”).
Thanks!!
<o> </o>
<o>
</o>
<o></o>
<o>
</o>
<o> </o>
Thanks for taking the time to look into my question!
<o> </o>
The below code works well for e-mailing sheet to different e-mail addresses that are identified in the code. As well as e-mailing multiple sheets for a particular e-mail address.
<o> </o>
My issue is the e-mail addresses have to be maintained in the code I would like to change this to refer to a located on a sheet “email”.
<o> </o>
The code would check column “C1:C100” if “yes” then it would use the address in column “D” and send sheets identify in (“E:Z”).
Thanks!!
<o> </o>
<o>
Excel Workbook | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | Branch | Name | Send | Sheet | Sheet | Sheet | Sheet | Sheet | |||
2 | 2563 | Jim Smith | Yes | Jim.Smith@email.com | 866 | ||||||
3 | 2365 | David Jones | Yes | David.Jones@email.com | 875 | 866 | 864 | ||||
4 | 2561 | Jack Black | Yes | Jack.Black@email.com | 864 | ||||||
5 | 5694 | Steve Myer | Yes | Steve.Myer@email.com | 855 | 822 | 821 | 833 | |||
6 | 6895 | Tom Sung | No | Tom.Sung@email.com | 842 | ||||||
7 | 5696 | Sam Dell | Yes | Sam.Dell@email.com | 857 | ||||||
Sheet1 |
<o></o>
<o>
Code:
<o:p> </o:p>
<o:p> </o:p>
Sub Multiple_Emails_and_Sheets()
' Multiple_emails_and_Sheets Macro
[COLOR=#00b050]'This is used for the branches one sheet with multiple e-mails.<o:p></o:p>[/COLOR]
ThisWorkbook.Sheets("866").Copy
Application.DisplayAlerts = False
With ActiveWorkbook
[COLOR=#00b050]'Enter E-mail address below<o:p></o:p>[/COLOR]
.SendMail Array (“[EMAIL="Jim.Smith@email.com"]Jim.Smith@email.com[/EMAIL]”)
"866 This is the Subject line"
.Close SaveChanges:=False
End With
[COLOR=#00b050]'This is used for the branches one sheet with multiple e-mails.<o:p></o:p>[/COLOR]
ThisWorkbook.Sheets("864").Copy
Application.DisplayAlerts = False
With ActiveWorkbook
[COLOR=#00b050]'Enter E-mail address below<o:p></o:p>[/COLOR]
.SendMail Array("Jack.Black@email.com"), _
" 864 This is the Subject line"
.Close SaveChanges:=False
End With
[COLOR=#00b050]'This is for the RM's multiple e-mails and multiple sheets<o:p></o:p>[/COLOR]
ThisWorkbook.Sheets(Array("855", "822",”821”,”833”)).Copy
Application.DisplayAlerts = False
With ActiveWorkbook
[COLOR=#00b050]'Enter E-mail address below<o:p></o:p>[/COLOR]
.SendMail Array("Steve.Myer@email.com", "[EMAIL="fj450614@yahoo.com"]fj450614@yahoo.com[/EMAIL]"), _
" 855 & 822 & 821 & 833 This is the Subject line"
.Close SaveChanges:=False
End With
End Sub
</o>