Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sent from account? (Outlook 2000)

    I want to add a BCC to outgoing messages. I have managed to do so with the following code:


    Dim objMe As Recipient
    Set objMe = Item.Recipients.Add("mailaddress@domain.com")
    objMe.Type = olBCC
    objMe.Resolve
    Set objMe = Nothing

    However, I want this to happen only for mails sent from a specific account.

    Any ideas?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Sent from account? (Outlook 2000)

    It can't be done directly, because there is no property of the message that you can retrieve which will tell you the account. You can read information from the Account drop-down at send time. In <post#=473448>post 473448</post#> there is code that could be adapted. That procedure reads the account choices and presents a dialog; it skips over the account currently assigned to send the message. You could instead retrieve the following string and use that in an If...Then...End If structure to assign the BCC for the appropriate account without presenting a choice to the user. (Or you could integrate both!)

    <code>' Retrieve currently assigned account
    strAccount = ActiveInspector.CommandBars("Standard").Controls(" Accounts").Controls(1).Caption</code>

    Hope this helps.

Posting Permissions

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