How to Auto Use Different Fonts for Different Accounts when Sending Email in Outlook

If you have configured several email accounts in your Outlook and would like to use different fonts in outgoing emails as per different email accounts used for sending, you can utilize the approach introduced in this article.

Many users hope that Outlook can auto select and use different fonts in outgoing emails based on different email accounts which they use for sending. However, by default, Outlook doesn’t have such a feature. Fortunately, you still can realize this with the help of VBA code. Now, we will reveal this method in detail.

Use Different Fonts for Different Accounts when Sending Email in Outlook

Auto Use Different Fonts for Different Accounts when Sending Email

  1. In the first place, start your Outlook application.
  2. Then, in the subsequent Outlook main window, you ought to press “Alt + F11” keys.
  3. Next, you’ll enter a new window – “Microsoft Visual Basic for Applications”.
  4. In this window, you’d be required to find and open the “ThisOutlookSession” project.
  5. Subsequently, copy and paste the following VBA code into this project.
'Occurs when you click "Send" button
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim objMail As MailItem
    Dim objMailDocument As Word.Document
 
    If TypeOf Item Is MailItem Then
       Set objMail = Item
       Set objMailDocument = objMail.GetInspector.WordEditor
 
       'Use different fonts based on different send using account
       'Change the accounts and fonts as per your needs
       Select Case objMail.SendUsingAccount
              Case "johnsmith@datanumen.com"
                   With objMailDocument.Range.Font
                        .Name = "Times New Roman"
                        .Size = 13
                        .ColorIndex = wdBlue
                   End With
              Case "team1@datanumen.com"
                   With objMailDocument.Range.Font
                        .Name = "Cambria"
                        .Size = 10
                        .ColorIndex = wdBlack
                   End With
              Case "johnsmith_jonny@outlook.com"
                   With objMailDocument.Range.Font
                        .Name = "Segoe Script"
                        .Size = 8
                        .ColorIndex = wdDarkYellow
                   End With
      End Select
 
      objMail.Save
    End If
End Sub

VBA Code - Use Different Fonts for Different Accounts

  1. After that, you are better off signing this code.
  • First, click on the “Tools” button in toolbar.
  • Then choose “Digital Signature” option from the drop down list.
  • Later you can follow the onscreen instructions to complete this task.
  1. Then, you can exit the current window and proceed to change your Outlook macro settings to permit the signed VBA projects.
  2. From now on, every time when you send an email, Outlook will auto change the fonts in the outgoing emails as per the email account for sending.

Keep Prepared for Unexpected Outlook Crash

Owing to Outlook’s vulnerability, users have to keep well-prepared for various issues when dealing with Outlook all the time. Without any doubts, one of the most essential steps is to make a consistent and up-to-date backup for Outlook data. With such backups, even though the original Outlook data gets damaged in crash, you still can recover Outlook data from backups with utmost ease. Plus, it is also advisable to equip your Outlook with a potent fix tool, such as DataNumen Outlook Repair. It will come in handy when backups fail.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql corruption and outlook repair software products. For more information visit www.datanumen.com

Leave a Reply

Your email address will not be published.