Email Array

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

I currently use an email array in which the email
addresses are hard coded into the script.


ActiveWorkbook.SendMail Recipients:=Array
("(e-mail address removed)", "(e-mail address removed)", "(e-mail address removed)"
), Subject:="my customers Supplier Status Report " & Date,
ReturnReceipt:="False"

Is there a way to tablize the array so that i can edit it
as needed without going into the code every time a change
comes up?

Thanks!
 
Patrick,

Put the email addresses in a worksheet range, and then assign that range to
an array

Dim aEmail

aEmail = Worksheets("email").Range("A1:A10")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Patrick

You can use the addresses in a range like this

Dim MyArr As Variant
MyArr = ActiveWorkbook.Sheets("mysheet").Range("c1:c10")
ActiveWorkbook.SendMail MyArr, "This is the Subject line"
 
Back
Top