How to Preset the Background Color of New Appointments in Your Outlook

When you create a new appointment, in the opened appointment window, you can’t find a direct option allowing you to set the background color. Thus, if you’d like to preset the background color of new appointments, you can use the way in this post

As you know, it is quite easy to change the background color of emails in Outlook. To be specific, in the opened Message window, you can find a “Page Color” button on “Options” tab, as shown in the following screenshot. After clicking it, you can choose your favorite color for background.

"Page Color" in Message Window

Nevertheless, unlike emails, there is not such a function for appointments. In the opened appointment window, you cannot find the “Options” tab, not to mention “Page Color” button. Therefore, if you want to preset the background color of an appointment, you have to seek other solutions. Now, in the followings, we’ll share you a method which uses VBA. If you aren’t familiar with VBA, you’d better refer to the post – “How to Run VBA Code in Your Outlook“.

Preset Background Color of New Appointments

  1. For a start, in Outlook, trigger VBA editor via “Alt + F11”.
  2. Then, enable “MS Word Object Library Reference” as per “How to Add an Object Library Reference in VBA“.
  3. Next, copy the following VBA code into “ThisOutlookSession” project.
Public WithEvents objInspectors As Outlook.Inspectors
Public WithEvents objApptInspector As Outlook.Inspector

Private Sub Application_Startup()
    Set objInspectors = Outlook.Application.Inspectors
End Sub

Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
    If TypeOf Inspector.CurrentItem Is AppointmentItem Then
       Set objApptInspector = Inspector
    End If
End Sub

Private Sub objApptInspector_Activate()
    Dim objAppointment As Outlook.AppointmentItem
    Dim objApptDocument As Word.Document
 
    Set objAppointment = objApptInspector.CurrentItem
 
    'Work on new appointment
    If objAppointment.Subject = "" Then
       Set objApptDocument = objApptInspector.WordEditor
 
       'Change background color
       'Modify code as per your needs
       objApptDocument.Background.Fill.ForeColor.ObjectThemeColor = wdThemeColorAccent1
       objApptDocument.Background.Fill.ForeColor.TintAndShade = 0.8
       objApptDocument.Background.Fill.Visible = msoTrue
       objApptDocument.Background.Fill.Solid
    End If
End Sub

VBA Code - Preset the Background Color of New Appointments

  1. After that, move cursor into the “Application_Startup” subroutine.
  2. Finally, press “F5” key button.
  3. Now, go to Outlook “Calendar” pane and click “New Appointment”.
  4. At once, a new appointment will be displayed, whose background color has been changed, as shown in the following figure.Background Color in New Appointment

Evade Outlook Data Loss

It is believed that you must be reluctant to suffering Outlook data damage or loss. Accordingly, you are required to take a variety of precautions. For instance, to get hold of a consistent and updated backup is a matter of necessity. In addition, you have to know where the inbox repair tool is placed and how to run it. Last but not least, you also ought to keep another experienced third party PST repair tool, like DataNumen Outlook Repair. It can repair PST issues in a jiffy.

Author Introduction:

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

2 responses to “How to Preset the Background Color of New Appointments in Your Outlook”

  1. Irina, you have forgot to add the Object Library Reference on step 2. But I recommend to choose Word instead of Excel as example shows. Also, in case you are using newer Office package select correct version. I added:
    [ x ] Microsoft Word 16.0 Object Library

  2. thanks I tried this but get a message that User-defined type not defined in the below part:

    Private Sub objApptInspector_Activate()
    Dim objAppointment As Outlook.AppointmentItem
    Dim objApptDocument As Word.Document

Leave a Reply

Your email address will not be published. Required fields are marked *