Select outgoing email (from) address from list via VBA
Posted on 2014-01-25
I'm using Outlook 2007.
I have several email addresses (cox, google, work, ...), all of which get forwarded to my primary email address (cox)
When I respond to these messages, or when I create a new message, I can fill in the From: address to use the specific address I want as my Sending address. But I prefer not to display the FROM box and have to type in the outgoing email address
What I would like to happen, is that when I click send, Outlook will popup a form with a list of possible outgoing email addresses allowing me to simply click the appropriate address, and complete the send operation using the Click event of the listbox.
I am an Access and Excel VBA programmer, so I am very familiar with VBA, but am totally unfamiliar with the Outlook object model. So what I need to know is:
1. what event I should use to popup this form, after I hit send and before the email is actually leaves my system, and
2. what properties of the mail item do I need to set (.From)
3. How to proceed with the send operation. I'm assuming if I open the popup form with an acWindowDialog argument, it will pause the process and simply hiding the form would allow me to continue the code, capture the info from the form, update the mail items .From property, and then close the form.