Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / March 2008

Tip: Looking for answers? Try searching our database.

macro tweaking

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jatman - 21 Mar 2008 21:40 GMT
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:="myemail@emailland.ca"
   '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
Chip Pearson - 21 Mar 2008 22:13 GMT
You need to pass an array in as the Recipients parameter. Either of the
following will work:

Dim Recip As Variant
Recip = Array("chip@cpearson.com", "cpearson@kc.rr.com")
ThisWorkbook.SendMail Recip, "Subject Goes Here"

' OR

Dim Recip As Variant
Dim S As String
S = "chip@cpearson.com;cpearson.kc.rr.com"
Recip = Split(S, ";")
ThisWorkbook.SendMail Recip, "Subject Goes Here"

Signature

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

> good afternoon,
>
[quoted text clipped - 16 lines]
>
> jat
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.