View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
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