1. Here's a thread that needs an answer: Default Send Account that Works?
    Dismiss Notice

Outlook 2010 Changing CC list to .add

Discussion in 'Outlook VBA and Custom Forms' started by BlackOps, Jul 28, 2016.

  1. BlackOps

    BlackOps

    Member
    Hi,

    Currently i am trying to tweek the code but i am not familiar with the function to add people to the current list of people being CC-ed.

    <code>
    Dim strSubject As String
    Dim myRecipient As Outlook.Recipient
    Dim i
    Dim CancelEvent
    Dim Found As Boolean
    Dim objNS As Outlook.NameSpace
    Set objNS = Outlook.GetNamespace("MAPI")
    Dim V As String
    CancelEvent = False
    Found = False
    i = 1
    Dim strSubject As String
    Dim myRecipient As Outlook.Recipient
    Dim i
    Dim CancelEvent
    Dim Found As Boolean
    Dim objNS As Outlook.NameSpace
    Set objNS = Outlook.GetNamespace("MAPI")
    Dim V As String
    CancelEvent = False
    Found = False
    i = 1
    SenderEmailAddress = objNS.Session.CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress
    Item.CC = SenderEmailAddress
    </Code>
    Many thanks for guideing me on this.
     
  2. Diane Poremsky

    Diane Poremsky

    Senior Member
    this: Item.CC = SenderEmailAddress replaces all other CC addresses.
    Use
    item.recipients.add (senderemailaddress)
    myRecipient.Type = olCC
     
  3. BlackOps

    BlackOps

    Member
    yup working fine. Thanks for the help once again. :)
     
  4. Virat Singh

    Virat Singh

    New Member
    I would also suggest you to use Use
    item.recipients.add (senderemailaddress)
    myRecipient.Type = olCC
     
Loading...

Share This Page