I often send emails on behalf of another user. I'd like to use VBA to automatically CC that user every time I send an email from/on behalf of that user.
I'm not familiar with VBA for Outlook but I'm thinking you could write an if statement that says "if sending message from UserX, cc UserX". The code should run automatically any time an email is sent on behalf.
This will do what you are looking for (It is the first Google results of "always CC myself Outlook") http://www.extendoffice.com/documents/outlook/1108-outlook-auto-cc.html
Then another dialog pops up.
(1.) In Step 1, check through the specified account box. In Step 2, please click on the word - specified. (2.) And then click the Account drop down list to choose the account that you want to apply this rule.
(1.) In this wizard, check Cc the message to people or public group box, and then click on people or public group in step 2.
(2.) In the Rule Address dialog box, double click your cc recipient to add the address to the To-> text box, (If I want to cc myself, I will select or type my own email address in the To-> column.), finally click OK.
Then after sending or forwarding an email message to others with your specified account, your account or your specific cc recipient will always receive the same message.
SentOnBehalfOfName is tricky. It is usually empty until the item has been sent.
With this code in ThisOutlookSession you should find it blank.
At least one way to get around this:
Edit: Just realized you could set the cc while creating / replying rather than waiting until ItemSend.
Edit2: Move the cc code from itemsend
It looks like you need to handle the ItemSend event of the Application class. It is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, but after the user clicks the Send button) or when the Send method for an Outlook item, such as MailItem, is used in a program. Note, the Cancel parameter allows to cancel the process of sending the email.
In the ItemSend event handler you can check out the SentOnBehalfOfName property of the item passed as a parameter and add the CC recipient using the Recipients property of the MailItem class. The Recipients collection provides the Add method for adding recipients.
After don't forget to call the Resolve or ResolveAll method of the Recipient class to resolve a Recipient object against the Address Book.
See How To: Fill TO,CC and BCC fields in Outlook programmatically for more information.