multiple address in the BCC filed of Outlook

G

gary

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
 
L

Leith Ross

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
 
G

gary

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top