This code is executed every time I select a message. I want this code to be executed only when I am composing new mail/replying/forwarding.
Private Sub Application_ItemLoad(ByVal Item As Object)
Dim oAccount As Outlook.Explorer
If TypeName(Item) = "MailItem" Then
MsgBox ("this is mail")
Set oAccount = Application.ActiveExplorer
MsgBox (oAccount.CurrentFolder.FolderPath)
End If
End Sub
What I am trying to achieve: When composing mail from specific account (account@mail.com) add recipient in CC field.
I am a noob in programming.