This is the calling macro
Public Sub New_Mail()
Dim oAccount As Outlook.Account
Load AccountSelect
With AccountSelect
.ComboBox1.Clear
For Each oAccount In Application.Session.Accounts
.ComboBox1.AddItem oAccount
' If InStr(1, oAccount, "(HC&TS)") > 0 Then .ComboBox1.Value = oAccount
Next
.Show
End With
Unload AccountSelect
End Sub
Create a userform and name it Accountselect
One comboox and two command buttons
Private Sub BtnCancel_Click()
Unload Me
End Sub
Private Sub BtnOK_Click()
If Len(Trim(Me.ComboBox1.Value)) = 0 Then Exit Sub
Dim oAccount As Outlook.Account
Dim oMail As Outlook.MailItem
For Each oAccount In Application.Session.Accounts
If oAccount = Me.ComboBox1.Value Then
Unload Me
Set oMail = Application.CreateItem(olMailItem)
oMail.SendUsingAccount = oAccount
oMail.Display
Exit For
End If
Next
BtnCancel_Click
End Sub
Private Sub ComboBox1_Change()
BtnOK_Click
End Sub
Name you command buttons accordingly ...
And all this in the Outlook VBA
Bookmarks