Created
May 13, 2013 17:55
-
-
Save devhawk/5570128 to your computer and use it in GitHub Desktop.
VBA macro to delete sub folders from Deleted Items in OUtlook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub RemoveAllDeletedItemsSubFolders() | |
Dim oDeletedItems As Outlook.Folder | |
Dim oFolders As Outlook.Folders | |
Dim oItems As Outlook.Items | |
Dim i As Long | |
'Obtain a reference to deleted items folder | |
Set oDeletedItems = Application.Session.GetDefaultFolder(olFolderDeletedItems) | |
Set oFolders = oDeletedItems.Folders | |
For i = oFolders.Count To 1 Step -1 | |
oFolders.Item(i).Delete | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment