PDA

View Full Version : CC more than one person on email



Lartk
01-04-2013, 07:12 AM
I have the below code which sends a email to one person and cc's another person. What is the format to CC two people?

Sub EmailSTIFEL()
Const FILE_ATTACH As String = _
"G:\K L\MBWB\AAAA.xls"
Dim oOutlook As Object
Dim oMailItem As Object
Dim oRecipient As Object
Dim oNameSpace As Object
Dim Lastrow As Long
Dim bodyText As String
Dim i As Long


Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
oNameSpace.Logon , , True


Set oMailItem = oOutlook.CreateItem(0)

With oMailItem

Set oRecipient = .Recipients.Add("orei@bloomberg.net")
oRecipient.Type = 1

.CC = "irasm@bloomberg.net"

.Subject = "YOU BUY"

.body = "You are high on Avalon's Bid List. Please see the attached document for item details." & vbNewLine & vbNewLine & _
"Ticket when you can." & vbNewLine & vbNewLine & _
"Let me know if you need anything else." & vbNewLine & vbNewLine & _
"Thanks, " & vbNewLine & vbNewLine & _
"K L " & vbNewLine & _
"713-555-5555" & vbNewLine & vbNewLine & _

If Dir(FILE_ATTACH, vbNormal) <> "" Then

.Attachments.Add ("G:\K L\MBWB\AAAA.xls")
.Save
End If

End With

End Sub

JKwan
01-04-2013, 07:36 AM
Don't you added within the CC:

.CC = "irasm@bloomberg.net;xx@xx.net"

Lartk
01-04-2013, 07:41 AM
Great, thank you!