Consulting

Results 1 to 3 of 3

Thread: CC more than one person on email

  1. #1
    VBAX Regular
    Joined
    Oct 2012
    Posts
    85
    Location

    CC more than one person on email

    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?

    [VBA]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[/VBA]

  2. #2
    VBAX Expert
    Joined
    Aug 2004
    Posts
    810
    Location
    Don't you added within the CC:
    [VBA]
    .CC = "irasm@bloomberg.net;xx@xx.net"
    [/VBA]

  3. #3
    VBAX Regular
    Joined
    Oct 2012
    Posts
    85
    Location
    Great, thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •