LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Using VBA to send email to distribution list ... how to CC?

Why not control the distribution list with the e-mail program. In Outlook,
you can set up groups which can be modified as needed and you would only have
to use the group name in the send mail command in VBA. That would shorten
the code considerably.

"S Davis" wrote:

Hey folks,

I've been using this for over a year now, so it works great. However,
I've run out of room on the single line I have been using within VBA
to send the email to addresses.

All the code below does is save one worksheet within the workbook to a
file named the current date, then email that seperate file out to a
distribution list. The distribution list (below,
to ) has been manually
typed in and updated as our group expands. The problem is I have run
out of room *sheepish* and don't know how to either expand this
distribution list onto a second line, or dump some addresses into the
CC for outlook.

If that's unclear - VBA simply won't let me type anymore characters
into the line I am using for the distribution list, and I need to add
more addresses.

Here's the (simple) code:

Private Sub WorkbookOpen()
ActiveWorkbook.Worksheets("Daily Email").Copy
ActiveSheet.UsedRange.Formula = ActiveSheet.UsedRange.value
ActiveWorkbook.SaveAs "\\Our_Server\Location\" & "Fleet Daily Status -
" & Format(Date, "Mmm-dd-yy") & ".xls"
ActiveWorkbook.SendMail ", [*
26 different addresses], ")


Can anyone please help me expand the distribution list onto a second
line? is it something as simple as ", &" ?

 
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
using text box or list boxes info for email distribution list gbpg Excel Programming 0 September 24th 07 12:18 AM
Excel VBA using Sendmail to Send to Distribution List belkingold Excel Programming 1 April 27th 07 03:58 PM
Send sheet to selected distribution list using VBA bsnapool[_15_] Excel Programming 1 July 19th 06 02:13 PM
Email distribution list Steve Excel Programming 9 April 22nd 04 09:24 PM
Send mail from vba with the outlook distribution list eli Excel Programming 0 January 2nd 04 10:21 PM


All times are GMT +1. The time now is 07:16 AM.

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

About Us

"It's about Microsoft Excel"