Empty Sync Issues/Conflicts Folders in Outlook 2007

Mel2620 used Ask the Experts™
How can I write a rule in Outlook 2007 to automatically empty the Synch Issues/Conflicts folders?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010

Hi, Mel2620.

That's not possible.  Rules only work on items as they are arrive and are sent.  There's no provision for a rule to empty any folder.  I think I can produce a script that would do this each time Outlook starts or closes.  Would that work?


Yes, that should work very well.  thank you.
Top Expert 2010
Ok.  This should do it.  Follow these instructions to use this.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click Tools > Trust Center
9.  Click Macro Security
10. Set Macro Security to "Warnings for all macros"
11. Click OK
12. Close Outlook
13. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

Each time you launch Outlook the script will run and empty the sync folder.
Private Sub Application_Startup()
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
    Set olkFolder = Nothing
End Sub

Open in new window

C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.


Thank you.  this works great for clearing the Sync Issues folder.  How can I edit this script to also empty the Conflicts folder?


Awesome job!  Thank you...I was able to edit it to also empty Conflicts folder and it all works great.
Top Expert 2010

Thanks and you're welcome.  Glad I was able to help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial