At work I have to use Windows 7 with Outlook 2003. We needed a solution to add the reply-to header to all outgoing mails. As out server uses Exchange 2003, Transport agents to change smtp headers are not supported.
So I had to code a client (Outlook 2003) solution, because the add-ins cost about 50 $ per user.
Add Reply-to header to all outgoing mails
- In Outlook open your Visual Basic Editor (<Alt>+<F11> or Extras → Macro → Visual Basic Editor)
- I did this in german, so the names may vary a bit: In Project1 (VbaProject.OTM) open Microsoft Office Outlook Objects → ThisOutlookSession
- Enter the following Code
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'add reply-To address Item.ReplyRecipients.Add "firstname.lastname@example.org" Item.ReplyRecipients.ResolveAll End Sub
- Save it
Activate the macro
Because macros are “dangerous” you have to set the security level down.
- Open Extras → Macro → Security.
- Change the security level from high to medium (or low which is not recommended)
- Click OK.
- You can sign you macro and always trust macros from yourself, so that you do not have to activate macros every time you start outlook (when you are on the medium security level)
- For deployment I recommend you to sign the macro and then copy the the file %appdata%\Microsoft\Outlook\VbaProject.OTM to the new computer (this overwrites all macros on the new computer with the macros from the source computer). On the new computer you should install the signature (In the security warning on Outlook startup click Details → Show Certificate → Install Certificate and then restart Outlook and always trust the macros from that source.
Sources: Change reply recipient dependent on the mail domain (german)