To reset the “Favorites” section, you may long for a method to batch remove all the folders from it, rather than doing it one by one manually. Looking at this need, this article will expose such a way to you.
In order to quickly access the frequently-needed mail folders, you can add them to “Favorites” section. It can help you get rid of troublesome locating folders. But, at present, if you would like to restore the “Favorites” section, you need to delete the folders from it one by one through “Remove from Favorites” option in context menu. Obviously, that means is quite tedious and cumbersome. Therefore, in the followings, we will introduce another way. It uses VBA code, so much handier and more effective. If you are not familiar with VBA, don’t panic. You can refer to the article – “How to Run VBA Code in Your Outlook“.
Batch Remove All Folders from “Favorites” Section
- At the very outset, start your Outlook application.
- Then, press “Alt + F11” to access VBA editor.
- Next, in the new window, copy the following code into a module or project.
Sub BatchRemoveAllFoldersfromFavorites() Dim objNavigationPane As Outlook.NavigationPane Dim objNavigationModule As Outlook.NavigationModule Dim objNavigationGroup As Outlook.NavigationGroup Dim i As Long Dim objNavigationFolder As Outlook.NavigationFolder 'Get Favorites Section Set objNavigationPane = Application.ActiveExplorer.NavigationPane Set objNavigationModule = objNavigationPane.Modules.GetNavigationModule(olModuleMail) Set objNavigationGroup = objNavigationModule.NavigationGroups.GetDefaultNavigationGroup(olFavoriteFoldersGroup) 'Remove All Folders from Favorites For i = objNavigationGroup.NavigationFolders.Count To 1 Step -1 Set objNavigationFolder = objNavigationGroup.NavigationFolders.Item(i) If objNavigationFolder.IsRemovable = True Then objNavigationGroup.NavigationFolders.Remove objNavigationFolder End If Next i End Sub
- Subsequently, run this macro either by “F5” key or clicking “Run” icon in the toolbar.
- When macro finishes, return to “Favorites” section. Over there, you’ll see that all the folders have been gone, as shown in the following figure.
Solve Outlook Problems with Reliable Tools
As we all know, Outlook is vulnerable to miscellaneous factors, such as software faults, hardware issues, virus infection, and human errors and so on. Besides, as a matter of fact, multiple users have complained a lot about this. Hence, more and more relevant Outlook repair tools are constantly emerging in today’s market. In face of them, you should keep awake, preventing trusting in those from unknown sources. In other words, you should only believe and use an experienced and well proven tool, such as DataNumen Outlook Repair. It is able to quickly find out the key issues involved with your PST file and fix them to its utmost.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including SQL Server fix and outlook repair software products. For more information visit www.datanumen.com
Leave a Reply