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 |
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 |
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 |
All times are GMT +1. The time now is 03:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com