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.
Auto Use Different Fonts for Different Accounts when Sending Email
- In the first place, start your Outlook application.
- Then, in the subsequent Outlook main window, you ought to press “Alt + F11” keys.
- Next, you’ll enter a new window – “Microsoft Visual Basic for Applications”.
- In this window, you’d be required to find and open the “ThisOutlookSession” project.
- 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
- 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.
- Then, you can exit the current window and proceed to change your Outlook macro settings to permit the signed VBA projects.
- 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