![]() |
![]() |
![]() |
When using Outlook to send e-mail messages, Outlook by default will send new messages using the default e-mail account. However where there is more than one account available, Outlook will reply or forward messages using the account to which the received messages were posted.
This is not always convenient and sometimes users may wish to choose from the available accounts when they send messages.
You can, from the message dialog, change the account from which the message will be sent, by clicking the little arrow adjacent to the From button (see below):
But it is easily overlooked. This page is therefore aimed a providing an easily reproducible macro solution that will prompt for the account when you click Send and force the user to select an account from which the message is to be sent.
Start by creating a userform. The userform employed by the process is simple. It uses the default names for all the elements except the userform itself, which should be called 'frmSelectAccount'.
Click ALT+F11 to open the VBA editor. From the editor's menu bar select 'Insert' then 'Userform' from the dropdown. From the Userform's properties change the name to frmSelectAccount as shown below:
Add a label, a list box and two command buttons to the userform as shown in the following illustration. You don't need to concern yourself over the names of the elements, their size or location. The names are the default names automatically applied and the rest are fixed in the macro that calls the form:
From the Project Explorer (CTRL+R) Right Click frmSelectAccount and select 'View Code' from the dropdown options. A code window will open into which the following code should be pasted:
From the Project Explorer then select Microsoft Outlook Objects > ThisOutlookSession
In the 'ThisOutlookSession' code window, copy and paste the following:
That's about it. Now when you click 'Send' the macro intercepts that command and displays the formatted version of the userform, with the list box displaying the available accounts.
No item is selected in the list. Selecting an item makes the Send Message command button available and that will send the message using the selected account. Quit, will not send the message, but return to the message itself.
For Outlook users who have more than one e-mail account available, this page features a basic interception of the Send command, to add a process to force the user to select the account from which the message is sent.
When this macro is used as supplied, no message can be sent without the user specifically selecting an account from the available listed accounts.