1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Public Sub TrierLesDoublons()
Dim FolderToTreat As Outlook.Folder, FolderToCheck As Outlook.Folder, ArrivalFolder As Outlook.Folder
Dim i%, j%
Set FolderToTreat = Outlook.Session.PickFolder
Set ArrivalFolder = Outlook.Session.PickFolder
Set FolderToCheck = FolderToTreat ' Pour les développements futures
For i = 1 To FolderToTreat.Items.Count - 1
For j = i + 1 To FolderToTreat.Items.Count
If (FolderToTreat.Items(i) = FolderToTreat.Items(j)) Then
Beep
Call FolderToTreat.Items(i).Move(ArrivalFolder)
Exit For
End If
Next j
Next i
End Sub |