Set olDuplicatesFolder = olFolder.Folders("Duplicates") Sub DeleteDuplicateEmails()ĭim objMail As Object, objDic As Object, objLastMail As Objectĭim olFolder As Folder, olDuplicatesFolder As Folderĭim received As Date, lastReceived As Date This script also takes into account the fact that some items use an HTMLBody for the full message definition, and others don't have that property. Once the date changes, you know you'll never see another email with the prior date, therefore, they won't be duplicates, so you can clear your dictionary on each date change. There's no need to maintain a giant dictionary of every email you've seen if you are processing emails in a deterministic order (e.g. Here's a script that takes advantage of sorting emails to check for duplicates much more efficiently. MsgBox "duplicate items were removed to ""removed items""", vbCritical, "See "
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |