I get a lot of questions asking how to delete the default folders, such as Junk Email, RSS, Conversation History, Archive, and Suggested Contacts. Microsoft Outlook creates these folders in the default data files. While I don't recommend deleting the default folders, anyone who really wants to delete default folders can delete them using MFCMAPI or OutlookSpy.
You can rename the defaults folders using the method at Rename default folders.
Deleting folders using these tools is usually not permanent: at some point in the future Outlook may decide to recreate the folder. It may be weeks, it may be months, but it often comes back. Exactly how long it stays gone depends on the folder, Outlook recreates some folders fairly quickly.
A macro to hide folders is at the end of this article. Add it to the QAT to easily re-hide folders when Outlook unhides them. To hide a number of folders at once, in all data files, see How to hide LinkedIn, FaceBook, Google and other extra contact folders in Outlook.com
In most cases, it's better to hide the folder. Outlook seems to be less inclined to remove the Hidden tag from the folder. However, hiding a folder does not stop Outlook from using it. If you hide Junk email, RSS, or Suggested Contacts folders, you need to disable the features that use the those folders.
Before using MFCMAPI or OutlookSpy, you should make a copy of your data file! While these steps are safe to use, it is very easy to have an "Oops, did I do that?" moment and lose your data.
Which folders are candidates for deletion or hiding? Junk Mail (only if its disabled first), RSS and Suggested Contacts (after disabling it in File, Options, Contacts).
Using scanpst or the /resetfolder switch may recreate the folders.
To use either method, get MFCMAPI. You'll need the 32-bit version if you use Outlook 2007, or Outlook 2010 and up in 32 bit. The 64-bit version is for use with Outlook 64-bit (NOT 64-bit Windows).
These instructions remove or hide default folders in a PST file. The process is similar with Exchange mailboxes, however, the missing folders are more likely to be recreated and removing them is not recommended.
Delete the Folder
- After downloading MFCMAPI, unzip it then double click to run.
- Click Session > Logon and choose your profile (if you have more than one)
- Double click on your data file. If you have more than one data file, the top one should be your default. (It will have True in the Default Store column.)
- Expand Root Container (or Root - Mailbox if using Exchange)
- Expand Top of Outlook Store. Exchange users will choose IPM_SUBTREE
- Select the folder you wish to delete.
- Right click and choose Delete Folder.
- Click OK. (Don't tick Hard Deletion, it doesn't work on most folders.)
- Close the dialogs and return to Outlook.
Hide the Folder
The macro at the end of this article automates these steps to hide the selected folder. If you accidentally hide the wrong folder, you'll need to use MFCMAPI to unhide it. Find the Hidden property and remove the tick from the Boolean field.
- After downloading MFCMAPI, unzip it then double click to run.
- Click Session > Logon and choose your profile (if you have more than one)
- Double click on your data file. If you have more than one data file, the top one should be your default. (It will have True in the Default Store column.)
- Expand Root Container (or Root - Mailbox)
- Expand Top of Outlook Store (or IPM_SUBTREE)
- Select Quick Step Settings folder
- Select "PR_ATTR_HIDDEN, PidTagAttributeHidden, ptagAttrHidden" entry (near the top)
- Right click and choose Copy Property
- Select the folder you wish to hide.
- Right click and choose Paste...
- Click OK twice to add the property to the folder.
- Close the dialogs and return to Outlook.
This screenshot shows the PR_ATTR_HIDDEN, PidTagAttributeHidden, ptagAttrHidden property added to the folder's property as well as the folder list without the Suggested Contacts folder (deleted) and Junk mail folder (hidden).
Use OutlookSpy
You can hide folders using OutlookSpy in 5 clicks:
- Select the Clutter folder
- Click IMAPIFolder button on the OutlookSpy ribbon
- Click “Add Property” button
- Type PR_ATTR_HIDDEN in the tag edit box and true in the value edit box
- Click OK
Restore a hidden folder
If you hid a folder and now need to unhide, you'll need to use MFCMAPI or OutlookSpy to remove the hidden folder. (If you are using Exchange cached mode and the folder appears in OWA, you can delete the ost file to restore the folder.)
- Open MFCMAPI.
- Go to Session, Logon.
- Double-click on the email account then Tools, Options and select “Use the MDB_ONLINE flag when calling OpenMsgStore”.
- Close then reopen the dialog box and Expand ‘Root Container’
- Expand “Top of Information Store”.
- Click on folder you need to unhide then Double-click “PR_ATTR_Hidden…” attribute.
- Check “Boolean” then OK
- If using Exchange or Office 365, verify that OWA did not display the folder.
- Then uncheck ‘Boolean’ and click OK to hide again. Check OWA.
- Start Outlook.
Manually Add the Property Tag using MFCMAPI
While it's easier for many people to copy and paste the property tag or use the macro, you can add the Hidden property tag to any folder using MFCMAPI.
- Get the property tag (0x10F4000B)
- Open MFCMAPI to the folder you want to hide
- Right-click an choose Edit Given Property
- Type or Paste the property into the Property name field and click Ok.
- Click Boolean then click OK to finish.
Tools
Utility hide unused folders in Outlook data files, include RSS, Calendar and Contacts in other .pst files. |
|
MFCMAPI uses Microsoft's published APIs to provide access to MAPI stores through a graphical user interface. Its purpose is to facilitate investigation of Exchange and Outlook issues and to provide developers with a canonical sample for MAPI development. Updated frequently. |
Use VBA to Hide Folders
To use this macro, paste it into the VBA editor, select the folder you want to hide and run the macro. If you need help using the VB Editor, see How to use the VBA Editor for more information and screenshots.
Option Explicit Public Sub HideFolders() Dim oFolder As Outlook.Folder Dim oPA As Outlook.propertyAccessor Dim PropName, Value, FolderType As String PropName = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B" Value = True Set oFolder = Application.ActiveExplorer.CurrentFolder Set oPA = oFolder.propertyAccessor oPA.SetProperty PropName, Value Set oFolder = Nothing Set oPA = Nothing End Sub
To unhide a folder, change
Set oFolder = Application.ActiveExplorer.CurrentFolder
to use a specific folder and change the Value line to False.
For example, if you accidently hid the Calendar, you'll use this for the oFolder line to unhide it.
Set oFolder = Session.GetDefaultFolder(olFolderCalendar)
More information on folder paths and other default folder names is available in the following article:
Working with All Items in a Folder or Selected Items
Option Explicit Public Sub UnHideFolders() Dim oFolder As Outlook.Folder Dim oPA As Outlook.propertyAccessor Dim PropName, Value, FolderType As String PropName = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B" Value = False ' for default folder: Set oFolder = Session.GetDefaultFolder(olFolderCalendar) ' for subfolder you created: ' Set oFolder = Session.GetDefaultFolder(olFolderInbox).Folders("folder name") ' for a folder at the same level as the inbox: ' Set oFolder = Session.GetDefaultFolder(olFolderInbox).Parent.Folders("folder name") Set oPA = oFolder.propertyAccessor oPA.SetProperty PropName, Value Set oFolder = Nothing Set oPA = Nothing End Sub
If you accidentally hid a folder and can't recall which folder it was, use this macro to create a list of folder names and the Hidden property value.
This macro is based on the macro at Print a list of your Outlook folders
To use, select the root of the data file you want to check and run the GetFolderHiddenState macro.
When finished, the macro creates a new email message containing all of the folders as shown in the very small sample below.
\\account name\Inbox - 5075 items. Is Hidden: False \\account name\Inbox\Test - 9 items. Is Hidden: False \\account name\Sync Issues\Server Failures - 0 items. Is Hidden: none \\account name\Contacts\Recipient Cache - 1206 items. Is Hidden: True \\account name\Need Replies\test - 2 items. Is Hidden: False
Warning: the list will contain a lot of folders you never knew existed. These are folders Outlook uses to store information it needs to work correctly, do not unhide them. "Is Hidden: none" means the folder does not have the Hidden property.
Public strFolders As String Public Sub GetFolderHiddenState() Dim olApp As Outlook.Application Dim olSession As Outlook.NameSpace Dim olStartFolder As Outlook.MAPIFolder Dim lCountOfFound As Long lCountOfFound = 0 Set olApp = New Outlook.Application Set olSession = olApp.GetNamespace("MAPI") ' Allow the user to pick the folder in which to start the search. Set olStartFolder = olSession.PickFolder ' Check to make sure user didn't cancel PickFolder dialog. If Not (olStartFolder Is Nothing) Then ' Start the search process. ProcessFolder olStartFolder End If ' Create a new mail message with the folder list inserted Set ListFolders = Application.CreateItem(olMailItem) ListFolders.Body = strFolders ListFolders.Display ' clear the string so you can run it on another folder strFolders = "" End Sub Sub ProcessFolder(CurrentFolder As Outlook.MAPIFolder) Dim i As Long Dim olNewFolder As Outlook.MAPIFolder Dim olTempFolder As Outlook.MAPIFolder Dim olTempFolderPath As String Dim oPA As Outlook.propertyAccessor Dim PropName, value, FolderType As String ' Loop through the items in the current folder. For i = CurrentFolder.Folders.count To 1 Step -1 Set olTempFolder = CurrentFolder.Folders(i) olTempFolderPath = olTempFolder.FolderPath ' Get the count of items in the folder olCount = olTempFolder.Items.count 'prints the folder path and name in the VB Editor's Immediate window Debug.Print olTempFolderPath & " " & olCount & " " & value ' Get the Hidden property value: PropName = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B" Set oPA = olTempFolder.propertyAccessor On Error Resume Next value = oPA.GetProperty(PropName) ' if the property does not exist: If value = "" Then value = "none" ' create the string strFolders = strFolders & vbCrLf & olTempFolderPath & " Contains " & olCount & " items. Is Hidden: " & value lCountOfFound = lCountOfFound + 1 Next ' Loop through and search each subfolder of the current folder. For Each olNewFolder In CurrentFolder.Folders ProcessFolder olNewFolder Next End Sub
How to use macros
First: You will need macro security set to low during testing.
To check your macro security in Outlook 2010 and up, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, it’s at Tools, Macro Security.
After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.
Open the VBA Editor by pressing Alt+F11 on your keyboard.
To put the code in a module:
- Right click on Project1 and choose Insert > Module
- Copy and paste the macro into the new module.
More information as well as screenshots are at How to use the VBA Editor
More Information
Discussion in TechNet forum
How to disable Outlook's Junk Email folder
I accidentally hide a folder, problem is I ran the vba macro and I didn't re-check which folder was (pre-)selected, how can I generate some kind of list of all folders which are hidden? Perhaps look for PropName = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B" with Value = True somehow?
Maybe through Exchange Management Shell or what ever?
Shell won't do it - you might be able to do it using vba - walk the folders, read the value. Based off this macro - https://www.slipstick.com/developer/print-list-of-outlook-folders/ - I'll take a look in the morning. :)
Cool, thx
I created a list of outlook folders for where I thought I'd be missing the folder and compared this to my shown folders and in 'print list' there was 1 folder extra so I did find the one which was gone missing.
How can I unhide this one with vba?
it's a sub folder parent to inbox (so not in inbox itself) and the folder has special characters: blah, blaablaaat
(it's stored in a shared-mailbox as: \blah, blaablaaat)
I thought I had an 'unhide' macro in the article - I'll find it and add it. It requires you to know the folder name/path - which is simple if the folder is the calendar or inbox. subfolders aren't hard, it just knowing the path.
Ah... it's in the text: "To unhide a folder, change Set oFolder = Application.ActiveExplorer.CurrentFolder to use a specific folder and change the Value line to False.
For example, if you accidently hid the Calendar, you'll use this for the oFolder line to unhide it.
Set oFolder = Session.GetDefaultFolder(olFolderCalendar)"
I think I will add it as a separate macro.
Nice, thx.
I did manage to workaround it with OutlookSpy, I'm just really curious if- and how it might be possible with VBA and hopefully learn something
I'm curious too. :) I'm sure it can be done - as the property can be read.
Yes! I did it. :) I'll post the macro above.
\\account\SPS Home page Contains 1 items. Is Hidden: False
\\account\Notes Contains 5 items. Is Hidden: False
\\account\News Feed Contains 0 items. Is Hidden: True
Nice work, really appreciated, thx.
Hi Diane!
How can you hide the Sync Issues (This computer only) folder? I tried using MFCMAPI. I'm able to Edit Given Property, Property Tag, which automatically edits the Property Type to hidden. I click ok, enable Boolean, click ok again, but the folder remains.I've included screen shots so you can see what I've experienced.
I can't be the only 'neat freak' out there that likes things tidy...or can I...? LOL.
Thank you in advance, Diane.
You cannot hide or delete that folder. Or the search folder.
It looks like, sorry if I'm wrong, all this info are for if you use the outlook app/program, there useless to me.
I use the web browser, NOT the app, all articles I read about help with outlook/hotmail stuff ONLY talks about the app/program.
Can you please point me to instructions for the web/browser version?
I'd LOVE to remove the 'news', 'notes'
& 'archive' folders that I can't remove at all.
You are stuck with those folders in the web version - Hiding the folders in outlook will somethings sync the change up to the server, so if you have outlook desktop, its worth trying. Archive and Notes are default folders in Outlook and while you can hide them, outlook or the server will unhide them eventually.
News is new, an experimental feature a small subset of lucky people have. It should disappear on its own in a few weeks - the experiments usually run about 6 weeks to 2 months. You can use in-app support to ask/complain about it.
Log into Outlook.com on the web using a PC or Mac.
Click the ? icon to open the Help menu.
Type a question. Scroll to the end of the research results and click Yes for Still need help?.
Thank you , thank you and once again thanks
I am unable to unhide the Archive folder
Please help
You'd use
(sorry I missed this earlier.)
Hi! I could not see this folder called as Quick Step Settings. Can you please let me know how i can see this?
Sorry it took me so long to reply - i kept forgetting to load MFCMAPI in a virtual machine that had only pop accounts... turns out that had i looked closer at the image I would have seen it said 'backup' If its a backup, it won't have the folder - quick steps aren't exported. (If you copy a pst to make a backup, it will have the folder.)
Does that file have any quick steps in it? Was it ever set as a delivery location for an email account? If not, there the folder won't exist.
Hello Diane,
Thanks for your reply.
I tried from another folder which had this option Quick step setting, copy and paste PR_ATTR_HIDDEN option, it worked. Folder was hidden.
One more question, if folder is hidden, server is able to take back up for that hidden folder also or back is only possible for visible folders?
exceptional post Thank you so much!
Hi! Thank you for this wonderful post. I was able to hide unwanted folders in Outlook 2016 using OutlookSpy. How do I restore hidden folders using OutlookSpy?
I could see in OutlookSpy a file called PR_ATTR_HIDDEN with "false" as a value. I assumed that it referred to a folder is not hidden.
Change the property to False to unhide. To use the macro to unhide, you need to reference the folder, rather than use 'current folder'