If you’re accustomed to set private appointments as free in your Outlook, why not directly let Outlook auto accomplish this task? This article will teach you how to get it with a bit of scripting.
“Busy/Free” information in calendar is really important. For instance, when you need to schedule a meeting, you’ll need to check when you have free time. If you are a person who attaches more importance to work instead of private matters, you’ll prefer to show all private calendar items as free. Thereby, when planning a meeting, even though there is a private appointment at a specific time, you could select delay or cancel the private item to schedule the meeting at that time. Now, in the followings, we’ll teach you a handy way to auto show private appointments as free.
Auto Show All Private Appointments as Free
- At first, launch Outlook application.
- Then, get access to VBA editor by referring to “How to Run VBA Code in Your Outlook“.
- Next, in the new window, copy the VBA code below into “ThisOutlookSession” project.
Private WithEvents objInspectors As Outlook.Inspectors Private WithEvents objExplorer As Outlook.Explorer Private WithEvents objCalendarItem As Outlook.AppointmentItem Private Sub Application_Startup() Set objInspectors = Outlook.Application.Inspectors Set objExplorer = Outlook.Application.ActiveExplorer End Sub Private Sub objExplorer_SelectionChange() On Error Resume Next If TypeOf objExplorer.Selection.Item(1) Is AppointmentItem Then Set objCalendarItem = objExplorer.Selection.Item(1) End If End Sub Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector) If TypeOf Inspector.currentItem Is AppointmentItem Then Set objCalendarItem = Inspector.currentItem End If End Sub Private Sub objCalendarItem_Open(Cancel As Boolean) If objCalendarItem.Sensitivity = olPrivate Then objCalendarItem.BusyStatus = olFree Else objCalendarItem.BusyStatus = olBusy End If End Sub Private Sub objCalendarItem_PropertyChange(ByVal Name As String) If Name = "Sensitivity" Then If objCalendarItem.Sensitivity = olPrivate Then objCalendarItem.BusyStatus = olFree Else objCalendarItem.BusyStatus = olBusy End If End If End Sub
- After that, exit the VBA editor.
- Finally, restart your Outlook to activate this project.
- Since then, every time when you set a calendar item as private, Outlook will auto show it free, like the following screenshot.
Fix Aggravating Outlook Troubles
Are you annoyed about occasional problems in Outlook? Many users have been plagued by them for a long time. For instance, at times, when they try to access a PST file, they receive an error message mentioning inaccessible file. At that time, they will firstly try to fix PST via the inbox repair tool – Scanpst. But, if it does not work, they have to take aid of a more powerful and effective repair tool, such as DataNumen Outlook Repair. It has earned a lot kudos due to its high PST recovery rate.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including mdf fix and outlook repair software products. For more information visit www.datanumen.com
Leave a Reply