Perhaps you have added multiple folders which are important and frequently used to the “Favorites” section in Outlook. Now, if you want to back up all folders in this section, you can use the means shared in this post.
Generally, in Outlook, so as to quickly access the significant and frequently needed mail folders, users can add them to the “Favorites” section. In this way, it can help users escape from locating and browsing to the folders among too many folders. It is pretty convenient. Moreover, due to the importance of the folders in “Favorites” section, many users are eager to finding a method which can rapidly back up them to a new Outlook PST file. At present, we will focus on this to share a quick solution.
Back up All Folders in “Favorites” Section to a New Outlook PST File
- For a start, go to Outlook VBA editor by reading “How to Run VBA Code in Your Outlook“.
- Then, copy the following VBA code into an unused module.
Sub BackUpFavorites() Dim strNewOutlookFile As String Dim objNewOutlookFile As Object Dim objNavigationPane As Outlook.NavigationPane Dim objNavigationModule As Outlook.NavigationModule Dim objNavigationGroup As Outlook.NavigationGroup Dim objNavigationFolder As Outlook.NavigationFolder Dim objFolder As Outlook.Folder 'Create a new Outlook file for backup strNewOutlookFile = "E:\Backups\Favorites Backup" & " (" & Format(Date, "yyyy-mm-dd") & ").pst" Outlook.Application.Session.AddStoreEx strNewOutlookFile, olStoreUnicode Set objNewOutlookFile = Session.Folders.GetLast() 'Get the Favorites Set objNavigationPane = Application.ActiveExplorer.NavigationPane Set objNavigationModule = objNavigationPane.Modules.GetNavigationModule(olModuleMail) Set objNavigationGroup = objNavigationModule.NavigationGroups.GetDefaultNavigationGroup(olFavoriteFoldersGroup) If objNavigationGroup.NavigationFolders.Count > 0 Then On Error Resume Next 'Copy each folder in Favorites to the new file For Each objNavigationFolder In objNavigationGroup.NavigationFolders Set objFolder = objNavigationFolder.Folder objFolder.CopyTo objNewOutlookFile Next MsgBox "Complete!", vbInformation + vbOKOnly End If End Sub
- Afterwards, press “F5” to run this macro at once.
- When you get the prompt “Complete”, you can go back to the mail navigation pane.
- You will discover a new Outlook data file. It contains all the folders in the “Favorites” section, as shown in the following figure.
Seclude Outlook from All Harms
To be honest, Outlook is directly exposed to myriad hazards, including software faults, hardware failures and viruses and so on. In order to safeguard your Outlook from data disaster, you need to persist in a lot of habits. For instance, you have to make regular backups for Outlook, and install an antivirus tool on your PC, monitoring your Outlook data, and get hold of a potent PST fix tool, like DataNumen Outlook Repair. In this way, you’ll be able to get back damaged PST data without trouble.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including SQL Server repair and outlook repair software products. For more information visit www.datanumen.com