|
|
|
Список адресатов при рассылке на автомате
|
|||
|---|---|---|---|
|
#18+
Друзья, подскажите как прописать в адресе рассылки через CDO не одиночный адресат а distribution list Код выглядит так Dim oMSG Dim oConfig Dim CFields Dim strBody Dim da As String Dim ans Dim ArcName As String Dim AFileName As String Dim hwnd As Long Dim distrlist As String distrlist = "Water" da = ThisWorkbook.Sheets("Summary").Cells(7, 1) AFileName = "C:\Databases\DSRreportready\November'09\DSR as of " & da & ".xls" ArcName = Left(AFileName, Len(AFileName) - 3) & "rar" ans = ShellExecute(Application.hwnd, "open", "C:\Program files\WinRAR\rar.exe", "a -m5 -ep """ & ArcName & """ """ & AFileName & """", "", SW_SHOW) Application.Wait (Now + TimeValue("0:00:03")) Set oMSG = CreateObject("CDO.Message") Set oConfig = CreateObject("CDO.Configuration") Set CFields = oConfig.Fields Set oMSG.Configuration = oConfig CFields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 CFields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smpt.m.ru" CFields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 CFields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "aaaaaa" CFields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "bbbbb" CFields("urn:schemas:mailheader:content-language") = "windows-1251" CFields.Update oMSG.To = "andrey@m.ru" oMSG.CC = "" oMSG.From = "Daily<andrey.noev@m.ru" oMSG.Subject = "DSR as of " & da oMSG.BodyPart.Charset = "windows-1251" oMSG.AddAttachment ArcName strBody = "ldldldldld" oMSG.HTMLBody = strBody 'oMSG.display oMSG.send Set CFields = Nothing Set oConfig = Nothing Set oMSG = Nothing именно эта процедура нужна. Спасибо ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.11.2009, 17:49 |
|
||
|
|

start [/forum/topic.php?fid=61&gotonew=1&tid=2178812]: |
0ms |
get settings: |
4ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
161ms |
get topic data: |
7ms |
get first new msg: |
4ms |
get forum data: |
2ms |
get page messages: |
21ms |
get tp. blocked users: |
1ms |
| others: | 204ms |
| total: | 422ms |

| 0 / 0 |
