vba - How can I compare all the titles of all RSS feeds and delete duplicates? -


i'm wondering if there way compare all titles in rss feeds , delete duplicates.

i read through lot of rss feeds, , it's obvious lot of people cross-post several forums, , end seeing same rss feed multiple times.

i think script this, doesn't seem delete dupes.....

option explicit public sub duperss()     dim olns outlook.namespace     dim rss_folder outlook.mapifolder      set olns = application.getnamespace("mapi")     set rss_folder = olns.getdefaultfolder(olfolderrssfeeds)      'process current folder     example rss_folder end sub public sub example(byval parentfolder outlook.mapifolder)     dim itm object, itms items, dupes object, long, k variant      set dupes = createobject("scripting.dictionary")     set itms = parentfolder.items      = itms.folders.count 1 step -1         set itm = itms(i)         if typeof itm postitem             if dupes.exists(itm.subject) itm.delete else dupes(itm.subject) = 0         else             example itm     'recursive call folders         end if     next      'show dictionary items     if dupes.count > 0         each k in dupes             debug.print k         next     end if      set itm = nothing:  set itms = nothing: set dupes = nothing end sub 

enter image description here

thanks all!!

looks misunderstood on previous question,

maybe trying do, following code saves/adds items subject line collection , continues search multiple folders , deletes if finds duplicates-

option explicit public sub duperss()     dim olns outlook.namespace     dim rss_folder outlook.mapifolder     dim dupitem object      set dupitem = createobject("scripting.dictionary")     set olns = application.getnamespace("mapi")     set rss_folder = olns.getdefaultfolder(olfolderrssfeeds)  '   // process current folder     example rss_folder, dupitem end sub public sub example(byval parentfolder outlook.mapifolder, _                    byval dupitem object)     dim folder outlook.mapifolder     dim item object     dim items items     dim long      set items = parentfolder.items     debug.print parentfolder.name      = items.count 1 step -1         doevents          if typeof items(i) postitem             set item = items(i)             if dupitem.exists(item.subject)                 debug.print item.subject ' print on immediate window                 debug.print typename(item) ' print on immediate window                 item.delete             else                 dupitem.add item.subject, 0                 debug.print dupitem.count, item.subject             end if         end if      next  '   // recurse through subfolders     if parentfolder.folders.count > 0         each folder in parentfolder.folders             example folder, dupitem             debug.print folder.name         next     end if      set folder = nothing     set item = nothing     set items = nothing end sub 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -