Undoubtedly, it is very easy to delete a single mail folder in Outlook. But if you want to delete multiple mail folders, deleting them individually will be quite cumbersome. In this article, we will guide you how to delete them in batches.
As usual, when you intend to delete a single mail folder, there are two methods available. As shown in the following screenshot, one is that you could right click this mail folder and then select “Delete Folder” from its context menu. The other one is that you should switch to “Folder” tab and click the “Delete Folder” button.
It is apparent that both of them are pretty simple. However, if you utilize either to delete multiple folders, it will be rather troublesome. Many users have expressed that they desire to delete multiple folders simply in one go. If all these folders are the subfolders under a specific folder, like the picture above, you indeed can use Outlook VBA to delete them via one click. But if not, you need to make some extra efforts. Read on to get them in detail.
If These Folders Are Subfolders under a Specific Folder
- To start with, launch Outlook.
- Then press “Alt + F11” key shortcuts to open the VBA editor.
- Next in the popup window, you should open a module which are not in use or insert a new module by “Insert” > “Module”.
- Subsequently, you need to copy the following codes into it.
Sub DeleteMultipleFolders() Dim objCurrentFolder As Folder Dim objSubFolders As Folders Dim i As Long On Error Resume Next Set objCurrentFolder = Outlook.Application.ActiveExplorer.CurrentFolder Set objSubFolders = objCurrentFolder.Folders For i = objSubFolders.Count To 1 Step -1 objSubFolders.Item(i).Delete Next End Sub
- After that, you can exit the current window and add the new macro to Quick Access Toolbar.
- Finally you can have a try.
- First elect the main folder.
- Then click the macro button in Quick Access Toolbar.
- At once, all the subfolders will be deleted.
The above trick will be considerably handy if these folders are all the subfolders under a specific folder. But if the folders to be deleted are located under different folders, you need to make some additional operations. Follow the steps below.
If These Folders Are Not Subfolders under a Specific Folder
- To begin with, create a new folder called “Temp”.
- Firstly, pitch on the correct PST file.
- Then click the “New Folder” button under “Folder” tab.
- Next type “Temp” in the “Name” field.
- Ultimately, click “OK” button.
- Subsequently, you need to drag the folders which you intend to delete to the “Temp” folder.
- After all these folders get moved and located in “Temp” folder, you can make use of the macro mentioned in the first section to delete all these subfolders under “Temp”.
Never Click the Links in Unknown Emails
Apart from your own macros, you should keep cautious of all the external macros in that they may contain viruses. As usual, these malicious macros are disguised as innocuous links in the emails. So if you cannot identify an email’s sender, you’d better not download its attachments or click on its links. Otherwise, your Outlook data will be likely to get infected. Thereby, to recover your corrupt Outlook data, the inbox tool, Scanpst.exe will not be helpful. You need resort to an external tool, such as DataNumen Outlook Repair.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair sql and outlook repair software products. For more information visit www.datanumen.com
Au top !
1
Hello, I want to subscribe for this website to take newest updates, thus where can i do it please help out.
Let say a sub folder begins with 1 and ends in 8,000 but I only want to remove sub folders 1,000 thru 8,000