We help IT Professionals succeed at work.

Outlook 2007 script  / macro to always BCC

AscotOsteopath
AscotOsteopath used Ask the Experts™
on


Hi there       - the solution below seems to work to send an automatic bcc of every outgoing email to a single email address (copying to my livemail account).

But how would I modify it so that I can add an additional bcc destination to my googlemail address?

Thanks!
            
------------
      19/04/07 04:33 PM, ID: 18943100

Rank: Sage
Was this solution helpful?
Yes No
BlueDevilFan:

BlueDevilFan:
Easily done with a bit of scripting.  Something like the one below.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim olkRecipient As Outlook.Recipient
    Set olkRecipient = Item.Recipients.Add("someone@somewhere.com")
    olkRecipient.Type = olBCC
    olkRecipient.Resolve
    Item.Save
End Sub

------------------------------
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011
Commented:
Replace:
Set olkRecipient = Item.Recipients.Add("someone@somewhere.com")
with
Set olkRecipient = Item.Recipients.Add("someone@somewhere.com; someoneelse@google.com")

Your seperator may be the comma rather than the semi colon and if so change it accordingly

Chris
Top Expert 2011

Commented:
i.e.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim olkRecipient As Outlook.Recipient
    Set olkRecipient = Item.Recipients.Add("someone@somewhere.com; someoneelse@google.com")
    olkRecipient.Type = olBCC
    olkRecipient.Resolve
    Item.Save
End Sub

Open in new window

Author

Commented:
Thanks! Works perfectly!
Top Expert 2011

Commented:
>>> Thanks! Works perfectly!

In that case why a B grade, (http://www.experts-exchange.com/help.jsp#hs=29&hi=403) suggests:

"... an answer is worth an A, unless it doesn't resolve your issue"

Chris

Author

Commented:
oops sorry about that - not an expert here, and I thought your answer was a "Good" answer to the question - can I change it to excellent as I don't mind at all?
Top Expert 2011

Commented:
No you can't change it but you can ask the mods via the request attention button.  As for grade terminology I hear you - perhaps why they put that recommendation on the help page because of the 'misunderstandings'.  From my perspective I 'expect' a B if I drop the ball when it comes to some relevant fine tuning but otherwise an A hence my initial winge.

Chris