Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
multiple address in the BCC filed of Outlook
i have the following code set up to e-mail, i want to have multiple addresses
in the BCCfield. how do i do that? Sub Mail_Sheet_Outlook_Body() Dim rng As Range Dim OutApp As Object Dim OutMail As Object With Application .EnableEvents = False .ScreenUpdating = False End With Set rng = Nothing Set rng = ActiveSheet.UsedRange 'You can also use a sheet name 'Set rng = Sheets("Lead Sheet").UsedRange Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .to = Format(Worksheets("Lead Sheet").Range("D32").Value, "mm-dd") .CC = Format(Worksheets("Lead Sheet").Range("D33").Value, "mm-dd") .BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd") .Subject = Format(Worksheets("Lead Sheet").Range("F9").Value, "mm-dd") .HTMLBody = Format(Worksheets("Lead Sheet").Range("A1:D35").Select, Application.CutCopyMode = False, Selection.Copy, "mm-dd") Application.SendKeys "^v" .Display End With On Error GoTo 0 With Application .EnableEvents = True .ScreenUpdating = True End With Set OutMail = Nothing Set OutApp = Nothing End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
multiple address in the BCC filed of Outlook
On Apr 4, 12:05 pm, gary wrote:
i have the following code set up to e-mail, i want to have multiple addresses in the BCCfield. how do i do that? Sub Mail_Sheet_Outlook_Body() Dim rng As Range Dim OutApp As Object Dim OutMail As Object With Application .EnableEvents = False .ScreenUpdating = False End With Set rng = Nothing Set rng = ActiveSheet.UsedRange 'You can also use a sheet name 'Set rng = Sheets("Lead Sheet").UsedRange Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .to = Format(Worksheets("Lead Sheet").Range("D32").Value, "mm-dd") .CC = Format(Worksheets("Lead Sheet").Range("D33").Value, "mm-dd") .BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd") .Subject = Format(Worksheets("Lead Sheet").Range("F9").Value, "mm-dd") .HTMLBody = Format(Worksheets("Lead Sheet").Range("A1:D35").Select, Application.CutCopyMode = False, Selection.Copy, "mm-dd") Application.SendKeys "^v" .Display End With On Error GoTo 0 With Application .EnableEvents = True .ScreenUpdating = True End With Set OutMail = Nothing Set OutApp = Nothing End Sub Hello Gary, The BCC field is a string. Multiple email address fields are separated with a semicolon ; Sincerely, Leith Ross |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
multiple address in the BCC filed of Outlook
so, all i would need to do is put a semicolon, then start this line again?
..BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd") "Leith Ross" wrote: On Apr 4, 12:05 pm, gary wrote: i have the following code set up to e-mail, i want to have multiple addresses in the BCCfield. how do i do that? Sub Mail_Sheet_Outlook_Body() Dim rng As Range Dim OutApp As Object Dim OutMail As Object With Application .EnableEvents = False .ScreenUpdating = False End With Set rng = Nothing Set rng = ActiveSheet.UsedRange 'You can also use a sheet name 'Set rng = Sheets("Lead Sheet").UsedRange Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .to = Format(Worksheets("Lead Sheet").Range("D32").Value, "mm-dd") .CC = Format(Worksheets("Lead Sheet").Range("D33").Value, "mm-dd") .BCC = Format(Worksheets("Lead Sheet").Range("D34").Value, "mm-dd") .Subject = Format(Worksheets("Lead Sheet").Range("F9").Value, "mm-dd") .HTMLBody = Format(Worksheets("Lead Sheet").Range("A1:D35").Select, Application.CutCopyMode = False, Selection.Copy, "mm-dd") Application.SendKeys "^v" .Display End With On Error GoTo 0 With Application .EnableEvents = True .ScreenUpdating = True End With Set OutMail = Nothing Set OutApp = Nothing End Sub Hello Gary, The BCC field is a string. Multiple email address fields are separated with a semicolon ; Sincerely, Leith Ross |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
e-mail address via outlook address book | Excel Programming | |||
USING OUTLOOK FILED ONEXCEL | Excel Programming | |||
Outlook Address Book | Excel Discussion (Misc queries) | |||
How do I import Office address book to Outlook Express address bo. | Excel Discussion (Misc queries) | |||
How to insert an address from Outlook 2003 address book ? | Excel Programming |