Klartigue
04-19-2012, 07:08 AM
How do I cc the email address mms_avalonserviceteam@ml.com in the below vba code?
Sub EmailMerrill()
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("mms_tradeallocationsteam@ml.com.com")
oRecipient.Type = 1
.Subject = "Avalon Trade Allocations Attached"
.body = "Please see the attached trade allocations." & vbNewLine & vbNewLine & _
"Let me know if you need anything else." & vbNewLine & vbNewLine & _
"Thanks, " & vbNewLine & vbNewLine & _
"Katherine Lartigue " & vbNewLine & _
"klartigue@avalonadvisors.com 713-238-2088"
.Attachments.Add ("G:\Katherine Lartigue\Allocations\Merrill Lynch Trades.xls")
.Save
End With
End Sub
Sub EmailMerrill()
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("mms_tradeallocationsteam@ml.com.com")
oRecipient.Type = 1
.Subject = "Avalon Trade Allocations Attached"
.body = "Please see the attached trade allocations." & vbNewLine & vbNewLine & _
"Let me know if you need anything else." & vbNewLine & vbNewLine & _
"Thanks, " & vbNewLine & vbNewLine & _
"Katherine Lartigue " & vbNewLine & _
"klartigue@avalonadvisors.com 713-238-2088"
.Attachments.Add ("G:\Katherine Lartigue\Allocations\Merrill Lynch Trades.xls")
.Save
End With
End Sub