Outlook 2013 How to delete duplicate RSS messages?

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
POP3
Long story, but I ended up having quite a lot of duplicate RSS messages in my 'RSS-Archive' folders.
(when organizing folders, I undoubtedly first created copies of the folders or messages before moving, I don't know).

I'd like to delete those duplicate RSS messages based on: title, date-time received.
Have been using a duplicate email remover, but for one reason or the other, the tool I used did not consider duplicate RSS feeds as duplicate, although I, myself, could not detect any difference at all.
Discussed the matter with the developer, but it seems there is a difference in size, for which reason it is not marked as duplicate.
When I copy paste two identical feeds into a text editor, they both have the same number of bytes, but indeed Outlook shows different sizes.

Maybe there is a way to delete such dups whilst using a rule?
Vainly tried to find a 3rd party tool for this specific task.

Thanks

=
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I'm not aware of any specifically for RSS feeds - they do have a different IPM form than mail, which is why the duplicate removers for mail don't work. Rules also won't work.

One cause of duplicates is that the item was edited and Outlook is set to identified edited items as new. That is probably why the difference in size. If all the subjects are all unique (save for the duplicates items) you might be able to use a macro to categorize or delete the duplicates.
 

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
POP3
Thank you. Well, I am afraid, I will have to leave it like that as I am totally unfamiliar with macros/VBA stuff.
Also duplicates are between on-duplicates, I hesitate to take the same action as in the video clip for duplicate mails
(adding modified field, sorting on that and then deleting, see video : https://youtu.be/o5xK4QbfCuY
Title: Delete Duplicated Email)

=
SnagIt-16052016 131338.png
=

As said, I leave it like this, manually deleting is wayyy too boring ;)

Anyway, thanks again!

=
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
deleting by modified date is not going to work - if i have time today, i will test a macro on my own heavily duplicated RSS feeds.

The proper way to check is to get a subject, then test it against each message in the folder then delete the ones with matching subjects. The problem is that it takes a long time to run against a lot of messages. And it assumes the messages each have a unique subject. if two different ones have the same subject, it would delete it. The addins also compare the size and dates, but this won't always work for duplicated feeds - if the duplicate is because it was republished, it can be a different size and might have a different date.
 

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
POP3
Thank you so much again. If it isn't too much trouble and time-consuming... it would be great!

One of the RSS archive folders contain some 2500 items. Yeah... needless to say: I did mess around a lot and I did that in a really magnificent way. Initially I more or less assumed, but admittedly did not verify, that RSS-posts would overwrite existing ones the same way as replacing files that are identical. Lateron I did discover the mounting number of RSS because of the duplicates, but then I continued (messing up) assuming that a duplicate email remover would delete those items in the end. My idea was it would be better to have the folder structure organized first and then remove the duplicates, rather then stopping leave matter somewhat disorganized and not knowing which RSS items would reside where. Ah well ...
tsk tsk tsk..
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
This seems to be working here - it only compares the subject field though. if the dates don't match, I'm not sure which one it is deleting, the old or the new.

You'll need to set a reference to the scripting runtime in tools, references.

Code:
Public Sub DeleteDupesCurrentFolder()

Dim i As Long
Dim n As Long
Dim Message As String
Dim Items As Object
Dim AppOL As Outlook.Application
Dim Folder As Object

Set Items = CreateObject("Scripting.Dictionary")

Set AppOL = Outlook.Application

Set Folder = AppOL.ActiveExplorer.CurrentFolder
n = Folder.Items.Count
'Loop backwards to ensure that the deleting of the emails does not interfere with subsequent items in the loop
For i = n To 1 Step -1

    On Error Resume Next
' filters only on the subject, add other fields as needed.
    Message = Folder.Items(i).Subject

        'Check a dictionary variable for a match
        If Items.Exists(Message) = True Then
        'If the item has previously been added then delete this duplicate
        Folder.Items(i).Delete
    Else
        'In the item has not been added then add it now so subsequent matches will be deleted
        Items.Add Message, True
End If

Next i

ExitSub:
Set Folder = Nothing
Set AppOL = Nothing

End Sub
 

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
POP3
It is great!
But...
(there is always a 'but')


I managed to get it going (of course, after I created a backup of the folder I applied the macro on)
There is one tricky thing though, as you already said, it compares titles only, not sizes and regretfully the macro deletes a bit too many feeds.

e.g.
title bla bla 20kb
title bla bla 20kb
title bla bla 5kb
title bla bla 5kb

only 1 is left, whereas the idea would be that 1x 5kb and 1x 20kb should be kept.

I am very sorry.
Though I really, really appreciate the work, regretfully the delete is a bit too drastic :)

=
 
Top