#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default macro tweaking

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 "
'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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default macro tweaking

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

Dim Recip As Variant
Recip = ", ")
ThisWorkbook.SendMail Recip, "Subject Goes Here"


' OR

Dim Recip As Variant
Dim S As String
S = "
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)




"jatman" wrote in message
...
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 "
'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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Tweaking formula? Richard Excel Discussion (Misc queries) 2 August 14th 06 12:52 PM
Golf Score Formula needs tweaking kevhatch Excel Discussion (Misc queries) 2 April 29th 06 12:48 AM
"AutoPrint" type macro requires tweaking 1drunkbrit Excel Discussion (Misc queries) 0 August 24th 05 08:04 PM


All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"