Link to home
Create AccountLog in
Avatar of sappledo
sappledo

asked on

add a vb BCC macro to office 2010 mail

I want to always send to a BCC the mail that I write.  I got the following Outlook 2007 code from another question in this EE.  How do I implement this in Outlook 2010?  I was able to bring up the Developer ribbon in Outlook 2010.

Here's the 2007 code:

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

Thanks.

Steve
ASKER CERTIFIED SOLUTION
Avatar of SiddharthRout
SiddharthRout
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account