1

Outlook 2010 (32-bit) Windows 7 (64-bit)

I have a system with Outlook 2010 (cached mode not enabled) and some of the sub-folders under the user inbox have become significantly bloated (containing in excess of 50000 messages). I'd like to clear these out as efficiently as possible (while preserving the directory name/place itself).

If I right-click on the folder and select "Delete All", I get a prompt that asks if I'm sure that I want to move all items in this folder to the Deleted Items folder. When I click yes, I see a "preparing to delete" progress bar... and when it reaches the end, nothing happens. The progress bar closes gracefully but the messages are still in the directory.

Is there an alternate way of doing this?

2 Answers 2

1

Delete All moves only items that reside in the selected folder (excluding subfolders). In order to achieve the desired result you will need to write a VBA script like that:

Private Sub CleanSubfolders(ByVal Folder As Folder)
    For i = Folder.Items.Count To 1 Step -1
        Folder.Items(i).Delete
    Next
    For Each Folder In Folder.Folders
        CleanSubfolders Folder
    Next
End Sub

Sub CleanFolders()
    Set Folder = Session.PickFolder()
    If Not Folder Is Nothing Then
        CleanSubfolders Folder
    End If
End Sub

Running the CleanFolders macro will effectively delete all items in the selected folder including all its subfolders.

0

I like @thims answer better since it specifically performs an identical task to what I was trying to do. That being said, I recently noticed that permanently deleting messages also clears out the folder.

To do this, hold the SHIFT key while right-clicking on the folder and select Delete All. This time, the user will get a prompt asking if you want to permanently delete all messages (instead of moving to recycle bin). This works so I suspect the underlying issue here is an Outlook bug moving massive amounts of messages between folders.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .