djhath
asked on
Help finish a script for Outlook to delete contents of 'Conflicts' folder.
From this question - https://www.experts-exchange.com/questions/24872180/Empty-Sync-Issues-Conflicts-Folders-in-Outlook-2007.html?sfQueryTermInfo=1+10+30+conflict+issu+outlook+sync
There was a script posted that would clean out the "Sync Issues" folder (see below). In the question, the asker was able to modify it to clean-out the 'Conflicts' subfolder. Since that is the folder I see most frequently as problematic, and since I also have no experience with what looks to be VBscript, would anybody be so kind as to 'finish' the script to include the "Conflicts" folder, too, please? With that, I think I'd be able to figure out how to include 'Local Failures' and 'Server Failures' ...
Thank you in advance.
There was a script posted that would clean out the "Sync Issues" folder (see below). In the question, the asker was able to modify it to clean-out the 'Conflicts' subfolder. Since that is the folder I see most frequently as problematic, and since I also have no experience with what looks to be VBscript, would anybody be so kind as to 'finish' the script to include the "Conflicts" folder, too, please? With that, I think I'd be able to figure out how to include 'Local Failures' and 'Server Failures' ...
Thank you in advance.
Private Sub Application_Startup()
ClearSyncFolder
End Sub
Sub ClearSyncFolder()
Dim olkFolder As Outlook.Folder, _
lngPointer As Long
Set olkFolder = Session.GetDefaultFolder(olFolderSyncIssues)
For lngPointer = olkFolder.Items.count To 1 Step -1
olkFolder.Items.Item(lngPointer).Delete
Next
Set olkFolder = Nothing
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Another approach is to clear all subfolders through recurrsive calls to the same procedure. This version of the script gets the Sync Issues folder, clears it, then clears all the folders beneath it.
Open in new window