2 Means to Quickly Remove Duplicate Holidays in Your Outlook Calendar

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.

Quickly Remove Duplicate Holidays in Your Outlook Calendar

Method 1: Remove All Holidays & Add Them Again

  1. To start with, launch your Outlook program.
  2. Then access the source Calendar folder.
  3. Next switch to “View” tab and choose “Change View” > “List”.Change Calendar View to List View
  4. After that, you should click on the “Categories” button in the “Arrangement” group.
  5. Next, you will see that all the appointments have been grouped by categories.
  6. Now you can find out the “Holiday” group.
  7. Finally, click on the “Holiday” group header and then press “Delete” key.Group by Categories & Delete All Holidays
  8. At once, all the existing holidays have been removed.
  9. After delete them, you can re-add the holiday. Firstly, go to “File” > Options”.
  10. In the popup “Outlook Options” window, you can switch to ‘Calendar” tab.
  11. Under this tab, you will be able to locate the “Add Holidays” button.
  12. Then, in the new dialog box, select a location, such as “United States” and hit “OK”.Re-add Holidays
  13. Eventually, the holidays have been imported into the default Calendar again.

Method 2: Remove Duplicate Holidays with VBA

  1. At the very outset, press “Alt + F11” key buttons.
  2. Next, you’ll access the Outlook VBA editor window, in which you could open an unused module.
  3. 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

VBA Code - Quickly Remove Duplicate Holidays in Your Outlook Calendar

  1. 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

Leave a Reply

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