So as to protect your privacy, you may always need to mark some specific meetings as private. This article will introduce you 2 quick means to automatically mark the specific ones as private.
My previous article “2 Quick Tips to Batch Make Multiple Outlook Appointments Private” has taught you 2 means to mark several appointments as private in one go. But both of them cannot help you to auto mark specific incoming meetings as private. When it comes to automation, perhaps you will think of Outlook rule. But there is not a “mark as private” action by default. Fortunately, you can use a short script to create such an action. Moreover, you are permitted to directly achieve it with Outlook VBA. So here we will introduce the two tips in detail.
Tip 1: Use Rule and a Short Script
- In the first place, start your Outlook program.
- Then press “Alt + F11” to access VBA editor.
- Next copy and paste the following VBA script into a new module.
Sub AutoMarkMeetingPrivate(objMeetingRequest As MeetingItem) Dim objMeeting As Outlook.AppointmentItem If TypeOf objMeetingRequest Is MeetingItem Then Set objMeeting = objMeetingRequest.GetAssociatedAppointment(True) objMeeting.Sensitivity = olPrivate objMeeting.Save End If End Sub
- Subsequently, exit VBA editor.
- And then click “Rule” > “Manage Rules & Alerts” under “Home” tab.
- After that, click “New Rule”.
- Next select “Apply rule on messages I receive” and hit “Next”.
- Then enable the concrete conditions to restrict the specific meetings, such as with specific words in the subject or body.
- Moreover, you need to add “use the Meeting Request form” condition by the steps shown in the following screenshot:
- After specifying the condition, click “Next”.
- Later you need to specify the action.
- Select “run a script”.
- Click “a script” link.
- Choose the previously added VBA script.
- Hit “OK” and “Next”.
- Eventually, you can follow the instructions to finish the rule setup as usual.
Apart from using Outlook rule to set the conditions of specific meeting, you can use Outlook VBA to get it as well like the followings.
Tip 2: Use Outlook VBA
- Firstly, press “Alt + F11” key buttons.
- Then open the “ThisOutlookSession” project window.
- Subsequently, copy and paste the following codes into it.
Public WithEvents objIncomingItems As Outlook.Items Private Sub Application_Startup() Set objIncomingItems = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Items End Sub Private Sub objIncomingItems_ItemAdd(ByVal Item As Object) Dim objMeetingRequest As Outlook.MeetingItem Dim objMeeting As Outlook.AppointmentItem If TypeOf Item Is MeetingItem Then Set objMeetingRequest = Item Set objMeeting = objMeetingRequest.GetAssociatedAppointment(True) 'Change the condition as per your actual needs If (objMeetingRequest.SenderEmailAddress = "firstname.lastname@example.org") Or (InStr(LCase(objMeeting.Subject), "test") > 0) Then objMeeting.Sensitivity = olPrivate objMeeting.Save End If End If End Sub
- After that, sign this code and change your macro settings.
- Finally restart Outlook to activate the new meeting.
Handle Vexing Outlook Problems
It is almost an unquestioned fact that Outlook PST is error prone. Thus you have to pay much attention to safeguard your Outlook PST data. For instance, you need to make regular backups for your PST file. In addition, you ought to prepare a reputable and remarkable repair tool, such as DataNumen Outlook Repair, which is able to fix PST errors without breaking a sweat.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including damaged mdf and outlook repair software products. For more information visit www.datanumen.com