Duplicate email remover for Outlook

Duplicate Email Finder/Remover for Outlook on Windows


Caution: This beta application is experimental and has had only limited testing. Please use it with caution and make sure you have a backup of your data first. 


Prerequisites

 

Summary

The software scans one or more Outlook folders and will perform a task on any duplicate e-mails it finds. When duplicates are found it can do any of the following:

 

 

How it works

After launching the program, the user can select some Outlook folders they want to include in the scanning...

[]

If the user selects more than one folder, then it will stop at the Folder Order step. The folder order is important. Folders will be scanned in order of this list. If there is a duplicate message in a folder higher one and in a folder lower down it will take action on the folder that is lower down. If you want the duplicates to be deleted out of a particular folder (when a duplicate might be in several folders), then you should move that folder down in the list.

[]

The next step is the Action to Take, and this step also has what fields should be considered a duplicate. The top part is pretty self-explanatory. For practice, I would use Log only or open each in Outlook or save the emails to a folder on your desktop first. When it looks like it is doing what you want, then you can run it again. If you're removing duplicates, instead of the harsh delete, I would create a folder and then select the move to folder function. Or you can just select the deleted items folder. I guess I like to be on the safe side a little bit.

For the Match on what fields section, use this with caution.  If you did something like just check the box "To Address(s)" the action item (like delete) would delete any email that has the same emails in the "To:" field. This would be 99% of your email likely and you don't what that.  To make sure the emails don't match more than you like more items should be checked here, or just leave it at the defaults.

[]

Select Accept (not shown) and Start.  The Accept is just to let you know that the author is not responsible for any damages.  The software is beta, and free, and provided As-Is.  I would just make sure you have a working backup.  

The Start will begin the search and action processing.  Do not open or close Outlook while this is running or it will cause it to error out and not complete.

[]

 

Show me the code

 

License

Copyright 2022 Ryan Scott White (none of this code may be posted to GitHub)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction(except on GitHub), including without limitation the rights to use(except on GitHub), copy(except on GitHub), modify(except on GitHub), merge(except on GitHub), publish(except on GitHub), distribute(except on GitHub), sublicense(except on GitHub), and/or sell copies of the Software(except on GitHub), and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 

Credits

I got the general idea on how to do this Thais Maria. As developers we usually start by searching online on how to accomplish something and this site was the most useful for me.

https://github.com/ThaisMap/RemoveOutlookDuplicates, 3/18/2021

I used a graphic from here:

 https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Mail_-_The_Noun_Project.svg/256px-Mail_-_The_Noun_Project.svg.png, 2022