If you add the same holidays to a same calendar twice or more times by accident, you’ll find that the calendar is stuffed with duplicate holidays. In this scenario, you must desire to remove the duplicates. Now, this article will teach you 2 means.
Outlook has an inbuilt feature to quickly add holidays into the default calendar. It is unquestionably pretty convenient for users. However, if you add the holidays twice or more times mistakenly, your default calendar will be filled up with the duplicate holidays. Now, in the followings, we will introduce you 2 approaches to fast remove the duplicates.
Method 1: Remove All Holidays & Add Them Again
- To start with, launch your Outlook program.
- Then access the source Calendar folder.
- Next switch to “View” tab and choose “Change View” > “List”.
- After that, you should click on the “Categories” button in the “Arrangement” group.
- Next, you will see that all the appointments have been grouped by categories.
- Now you can find out the “Holiday” group.
- Finally, click on the “Holiday” group header and then press “Delete” key.
- At once, all the existing holidays have been removed.
- After delete them, you can re-add the holiday. Firstly, go to “File” > Options”.
- In the popup “Outlook Options” window, you can switch to ‘Calendar” tab.
- Under this tab, you will be able to locate the “Add Holidays” button.
- Then, in the new dialog box, select a location, such as “United States” and hit “OK”.
- Eventually, the holidays have been imported into the default Calendar again.
Method 2: Remove Duplicate Holidays with VBA
- At the very outset, press “Alt + F11” key buttons.
- Next, you’ll access the Outlook VBA editor window, in which you could open an unused module.
- Subsequently, copy the following VBA code into this module.
Sub RemoveDuplicateHolidays() Dim objStores As Outlook.Stores Dim objStore As Outlook.Store Dim objPSTFile As Outlook.Folder Dim objFolders As Outlook.folders Dim objFolder As Object Set objStores = Outlook.Application.Session.Stores 'Process all Outlook PST files in your Outlook For Each objStore In objStores Set objPSTFile = objStore.GetRootFolder For Each objFolder In objPSTFile.folders Call ProcessFolders(objFolder) Next Next End Sub Sub ProcessFolders(ByVal objCurrentFolder As Outlook.Folder) Dim objDictionary As Object Dim i As Long Dim objItem As Object Dim strKey As String Set objDictionary = CreateObject("Scripting.Dictionary") If objCurrentFolder.DefaultItemType = olAppointmentItem Then For i = objCurrentFolder.Items.count To 1 Step -1 Set objItem = objCurrentFolder.Items.Item(i) 'Get all holidays based on the "Holiday" category If objItem.Categories = "Holiday" Then strKey = objItem.Subject & "," & objItem.Location & "," & objItem.Body & "," & objItem.Categories strKey = Replace(strKey, ", ", Chr(32)) If objDictionary.Exists(strKey) = True Then objItem.Delete Else objDictionary.Add strKey, True End If End If Next i End If End Sub
- Ultimately, you can try this macro.
- Click into the “RemoveDuplicateHolidays” subroutine.
- Then press F5 key button to run it.
- After it completes, all the duplicate holidays in all your Outlook calendars are removed.
Retrieve Valuable Outlook Data
It’s an unquestioned fact that no program can guarantee that it can be immune from error and corruption. The same holds true for Outlook. Therefore, in order to protect your Outlook data, you had better make regular data backups. Besides, you need to schedule an Outlook recovery plan in advance. Last but not least, it is prudent to prepare a reputable fix tool, such as DataNumen Outlook Repair. It is able to repair Outlook issues in a jiffy and get back maximum Outlook data from compromised file.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover Sql Server and outlook repair software products. For more information visit www.datanumen.com