Share via

Deleting Empty Folders from the Deleted Items folder in Outlook

Anonymous
2019-12-21T22:57:21+00:00

Over time, for some reason, "empty folders" have accumulated in my deleted items folder, in Outlook.  I only see these on the Web (O365) app and the phone app. In the outlook PC client, I do not see these folders at all.

Having all these folders (hundreds that have accumulated over time) present, makes the mobile app virtually useless as mobile app wants to show you (apparently) every folder ever created and provides no ability to collapse/close folders I do not want to see the contents thereof.

Is there any known, reliable method to get rid of empty deleted items folders without having to use the Web app, and deleting them....one by drudgerous one?

thx...!

Moved from Outlook.com/ Email/ Managing email folders

Outlook | Windows | Classic Outlook for Windows | For home

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

7 answers

Sort by: Most helpful
  1. Anonymous
    2019-12-26T10:49:45+00:00

    Hi Klocke,

    The Outlook desktop client can also display all folders, just click "Ctrl" + "6" to switch to Folder list view. Then you can find all the empty folders in Outlook and delete them if you don't need them any more. Press "Ctrl" + "1" will return Mail view.

    And I prepare a VBA code for you to remove all empty subfolders of a certain Outlook folder, you can have a try to see if it work.

    Please follow the steps below:

    1. Press Alt + F11 to open VBA window.
    2. Click Insert > Module, and paste below code into the new module window:

    Public Sub DeletindEmtpyFolder()

    Dim xFolders As Folders

    Dim xCount As Long

    Dim xFlag As Boolean

    Set xFolders = Application.GetNamespace("MAPI").PickFolder.Folders

    Do

    FolderPurge xFolders, xFlag, xCount

    Loop Until (Not xFlag)

    If xCount > 0 Then

    MsgBox "Deleted " & xCount & "(s) empty folders", vbExclamation + vbOKOnly, "Kutools for Outlook"

    Else

    MsgBox "No empty folders found", vbExclamation + vbOKOnly, "Kutools for Outlook"

    End If

    End Sub

    Public Sub FolderPurge(xFolders, xFlag, xCount)

    Dim I As Long

    Dim xFldr As Folder 'Declare sub folder objects

    xFlag = False

    If xFolders.Count > 0 Then

    For I = xFolders.Count To 1 Step -1

    Set xFldr = xFolders.Item(I)

    If xFldr.Items.Count < 1 Then 'If the folder is empty check for subfolders

    If xFldr.Folders.Count < 1 Then 'If the folder contains not sub folders confirm deletion

    xFldr.Delete 'Delete the folder

    xFlag = True

    xCount = xCount + 1

    Else 'Folder contains sub folders so confirm deletion

    FolderPurge xFldr.Folders, xFlag, xCount

    End If

    Else 'Folder contains items or (subfolders that may be empty).

    FolderPurge xFldr.Folders, xFlag, xCount

    End If

    Next

    End If

    End Sub

    1. Click Run/F5, and select the target folder to run this VBA
    2. The empty folders should be deleted

    Hope this can be helpful.

    Best,

    Shawn

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-12-30T14:57:21+00:00

    I did give it a try and it mostly did work.  It did throw an error at some point in the process.  but running it a couple of times seems to pick up all the folders/subfolders.  On other folders, it deleted the subfolders just fine.  Not sure what the difference was, but it saved me a lot of time regardless. Thank you!  

    line that threw error (sorry...wish I had captured the error as it was intermittent)

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-12-31T15:45:03+00:00

    Hi Klocke,

    Thanks for your feedback. We're glad to this can help you in some degree.

    Best,

    Shawn

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2019-12-23T14:58:01+00:00

    That's what i ultimatedly ended up doing.  Seems so strange to have "current" applications behaving so archaically (ie, capabilities we have grown to expect in all other (non-MS) email clients, so obviously missing in MS's.

    thx brian....

    Was this answer helpful?

    0 comments No comments
  5. Brian Tillman 25,465 Reputation points Independent Advisor
    2019-12-22T00:19:19+00:00

    I don't know of any way other than one-by-one to delete the folders from the Deleted Items folder.

    Was this answer helpful?

    0 comments No comments