Email Array

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!
 
B

Bob Phillips

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)
 
R

Ron de Bruin

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top