Clear Offline (Task) Items using VBA

Not open for further replies.


New Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
I have an Outlook 2013 Task folder which sync's with a SharePoint List.

Sometimes when that SharePoint List is updated (primarily via MS Project 2013 Pro which also sync's to the same SharePoint List) the tasks duplicate in the Outlook Task list view.

After some investigation I have found that the issue relates to Outlook's local caching of a copy of the Tasks and can be solved within Outlook by:

Right Click on the Task Folder-> Properties-> Clear Offline Items ->OK (to confirm local changes loss) -> OK (to acknowledge data removed from .ost file) then re-sync the folder (Shift+F9)

BTW, tried switching off Exchange Caching but that didn't stop the issue. Seems the Offline items are created regardless.

Ideally to remove the risk of individuals causing the SP List and MS Project Plan becoming (regularly) messed up with duplicate tasks I'd like to automate the steps needed into a single button press:

1. Clear Offline Items
2. Sync Tasks list with SP List (effectively download latest golden copy using Shift+F9)
3. User makes any updates changes to Task
4. Commit Changes (another Shift+F9 or more likely another button for committing the changes)

The trouble is I can't find anything on how perform that Clear Offline Items using VBA.

Would appreciate any help anyone is able to provide on how to solve this one.
Not open for further replies.