
StrKey = objItem.Subject & "," & objItem.Body & "," & objItem.SentOn Set objDictionary = CreateObject("scripting.dictionary")įor n = To 1 Step -1 MsgBox "Error: The two folders are not in same type!", vbExclamation + vbOKOnlyįor i = To 1 Step -1 If objSourceFolder.DefaultItemType objTargetFolder.DefaultItemType Then Sub MergeOutlookFolders_WithoutDuplicates() 'Here we take "merging two folders" as an example


In this situation, if there are some duplicated contacts among these folders, you must hope that the duplicates can be removed automatically during merging. It is using VBA code to help you accomplish it like a cork.Īt times, you may wish to merge items from several Outlook folders, like merging all the contacts of several Outlook Contacts folders. If you would like to merge all the items from multiple Outlook folders and insure no duplicate, you can use the method introduced in this article.
