Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel VBA using Sendmail to Send to Distribution List

I am trying to use the SendMail function in Excel VBA to send the
workbook as an attachment to a distribution list. The distribution
list contains spaces, and it keeps coming back as an unknown
recipient. Here's the code, it's pretty simple:

ActiveWorkbook.SendMail _
Recipients:=EmlAddr & ";" & CCAddr, _
Subject:=FleNme


The variables:

EmlAddr = "
CCAddr = " CCI HRD - LNP Support"

I realize, of course that this is all going in to the To: line and
that you can't use an actual CC with sendmail, but that's not really a
big deal to me. CCAddr is the distribution list.

Any suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel VBA using Sendmail to Send to Distribution List

How about:

Recipients:=array(EmlAddr, CCAddr)

(untested)

belkingold wrote:

I am trying to use the SendMail function in Excel VBA to send the
workbook as an attachment to a distribution list. The distribution
list contains spaces, and it keeps coming back as an unknown
recipient. Here's the code, it's pretty simple:

ActiveWorkbook.SendMail _
Recipients:=EmlAddr & ";" & CCAddr, _
Subject:=FleNme

The variables:

EmlAddr = "
CCAddr = " CCI HRD - LNP Support"

I realize, of course that this is all going in to the To: line and
that you can't use an actual CC with sendmail, but that's not really a
big deal to me. CCAddr is the distribution list.

Any suggestions?


--

Dave Peterson
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
Distribution list from Excel vocegrosso Excel Discussion (Misc queries) 2 March 4th 08 10:11 PM
Send sheet to selected distribution list using VBA bsnapool[_15_] Excel Programming 1 July 19th 06 02:13 PM
Excel Distribution list Chris Excel Discussion (Misc queries) 2 December 12th 05 05:40 PM
Send mail from vba with the outlook distribution list eli Excel Programming 0 January 2nd 04 10:21 PM
Problems with SendMail or automation of Send To Douglas Wills Excel Programming 7 October 1st 03 04:45 PM


All times are GMT +1. The time now is 10:39 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"