How to Auto Assign a Specific Color Category to a Meeting after Accepting It in Outlook
Many users wish Outlook to auto assign a specific color category to a meeting when they accept it. At present, this article will expose a piece of VBA code to achieve it with effortless ease.
To classify and highlight the accept meetings in the Outlook calendar, you may be used to assigning a specific color category to such meetings. In comparison with manually category assignment, which is a bit troublesome, you must prefer to let Outlook auto accomplish it. Therefore, in the followings, we will share you a way in detail.
Auto Assign a Specific Color Category to a Meeting after Accepting It
For a start, launch Outlook application.
Then, trigger Outlook VBA editor according to “How to Run VBA Code in Your Outlook”.
Subsequently, put the following VBA code into “ThisOutlookSession” project.
Public WithEvents objSentFolder As Outlook.Folder
Public WithEvents objSentItems As Outlook.Items
Private Sub Application_Startup()
Set objSentFolder = Outlook.Application.Session.GetDefaultFolder(olFolderSentMail)
Set objSentItems = objSentFolder.Items
End Sub
Private Sub objSentItems_ItemAdd(ByVal Item As Object)
Dim objMeetingItem As Outlook.MeetingItem
Dim objMeetingAcceptance As Outlook.MeetingItem
Dim objMeeting As Outlook.AppointmentItem
‘If a meeting acceptance item arrives in “Sent Items” folder
If TypeOf Item Is MeetingItem Then
Set objMeetingItem = Item
If Left(objMeetingItem.Subject, 9) = “Accepted:” Then