title: Send from another email address in Outlook
body: <p>My users have their personal mailbox as their primary account and an auto-mapped shared mailbox configured in their Outlook 2010 client. The shared mailbox is an Office 365 shared mailbox and thus cannot be logged into to set it as the primary account. </p>
  
  <p>I am trying to start a new email from the shared account's address.</p>
  
  <p>Below is the VBA code I have been trying to use. I have allowed Macros in Outlook's trust center settings.</p>
  
  <pre><code>Public Sub New_Mail()
  Dim oAccount As Outlook.Account
  Dim oMail As Outlook.MailItem
  For Each oAccount In Application.Session.Accounts
      If oAccount = "sharedMailboxAddress@domain.tld" Then
          Set oMail = Application.CreateItem(olMailItem)
          oMail.SendUsingAccount = oAccount
          oMail.Display
      End If
  Next
  End Sub
  </code></pre>