我想知道是否有方法比較ALL TITLES in ALL RSS FEEDS
並刪除重複項。如何比較所有RSS提要的所有標題並刪除重複項?
我讀了很多RSS
Feed,很明顯,很多人都在多個論壇交叉發帖,然後我多次看到相同的RSS
Feed。
我覺得劇本會是這個樣子,但它似乎並沒有刪除受騙者.....
Option Explicit
Public Sub DupeRSS()
Dim olNs As Outlook.NameSpace
Dim RSS_Folder As 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 As Outlook.MAPIFolder)
Dim itm As Object, itms As Items, dupes As Object, i As Long, k As Variant
Set dupes = CreateObject("Scripting.Dictionary")
Set itms = ParentFolder.Items
For i = itms.Folders.Count To 1 Step -1
Set itm = itms(i)
If TypeOf itm Is PostItem Then
If dupes.Exists(itm.Subject) Then itm.Delete Else dupes(itm.Subject) = 0
Else
Example itm 'Recursive call for Folders
End If
Next i
'Show dictionary items
If dupes.Count > 0 Then
For Each k In dupes
Debug.Print k
Next
End If
Set itm = Nothing: Set itms = Nothing: Set dupes = Nothing
End Sub
感謝所有!
Ahhhhhh!這是一件美麗的事情!這正是我想要的!非常感謝!! – ryguy72