macro tweaking

J

jatman

good afternoon,

i have most of my macro written (Office 2007,) but am having a small issue
with the following line:

'Sub Email() - sends a copy of the email to the recipients
ActiveWorkbook.SendMail Recipients:="(e-mail address removed)"
'End Sub Email()

i cannot get more than one email address into the recipients list without
getting some sort of an error. how would i add more than one recipient to
the list. i have tried commas, semi-colons, and the "&" symbol between the
email addresses.

any other suggestions?

thank you,

jat
 
C

Chip Pearson

You need to pass an array in as the Recipients parameter. Either of the
following will work:

Dim Recip As Variant
Recip = Array("(e-mail address removed)", "(e-mail address removed)")
ThisWorkbook.SendMail Recip, "Subject Goes Here"


' OR

Dim Recip As Variant
Dim S As String
S = "(e-mail address removed);cpearson.kc.rr.com"
Recip = Split(S, ";")
ThisWorkbook.SendMail Recip, "Subject Goes Here"


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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