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.
Use PowerShell to Hide or Unhide a Folder
This PowerShell sample will hide or
$Outlook = New-Object -comobject Outlook.Application $ns = $Outlook.GetNameSpace("MAPI") $PropName = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B" #hide the selected folder #$Folder =($Outlook.ActiveExplorer()).CurrentFolder #hide or unhide a default folder (Journal in this case) $Folder = $ns.GetDefaultFolder(11) # hide or unhide a folder at the same level as the inbox #$Folder = $ns.GetDefaultFolder(6).Parent.Folders.Item(".Test") # hide or unhide a subfolder of inbox #$Folder = $ns.GetDefaultFolder(6).Folders.Item(".Test") write-host $($Folder.Name) $oPA = $Folder.PropertyAccessor $value = $oPA.GetProperty($PropName) write-host $Indent$($Folder.Name)" ("$($Folder.Items.Count)")" $value # true = hidden, false = visible # check to see if hidden and change to visible If ($value -eq $true) { write-host "changing prop" $oPA.SetProperty($PropName, $false) } $value = $oPA.GetProperty($PropName) write-host $Indent$($Folder.Name)" ("$($Folder.Items.Count)")" $value
Using PowerShell Scripts
To use PowerShell scripts with Outlook, start typing PowerShell on the start menu and open Windows PowerShell when it comes up. Windows PowerShell ISE has a script pane at the top, which is useful if you want to edit the script.
Paste the entire script in the PowerShell window and press Enter or the Run button if using PowerShell ISE.
Note: PowerShell scripts will not work with the Windows Store version of Office. You'll need to use a VBA macro version if you have the Windows store version of Office installed.
Saving PowerShell Scripts
If you want to save the script as a .ps1 file, paste it into Notepad and save it with the extension .ps1. To open it in the PowerShell IDE, type powershell on the start menu and click on Windows PowerShell IDE when the PowerShell app is found. Paste the script in the editing window.
To use it, you need to allow local scripts by running this command:
Set-ExecutionPolicy RemoteSigned
To run your saved .ps1 file, right-click on the script and choose Run with PowerShell.
Default Folder Enumeration Values
Name | Value | Description |
---|---|---|
olFolderCalendar | 9 | Calendar folder |
olFolderConflicts | 19 | Conflicts folder. (Business Exchange server only) |
olFolderContacts | 10 | Contacts folder |
olFolderDeletedItems | 3 | Deleted Items folder |
olFolderDrafts | 16 | Drafts folder |
olFolderInbox | 6 | Inbox folder |
olFolderJournal | 11 | Journal folder |
olFolderJunk | 23 | Junk E-Mail folder |
olFolderLocalFailures | 21 | Local Failures folder. (Business Exchange server only) |
olFolderManagedEmail | 29 | Top-level folder in Managed Folders group. (Business Exchange server only) |
olFolderNotes | 12 | Notes folder |
olFolderOutbox | 4 | Outbox folder |
olFolderSentMail | 5 | Sent Mail folder |
olFolderServerFailures | 22 | Server Failures folder. (Business Exchange server only) |
olFolderSuggestedContacts | 30 | Suggested Contacts folder |
olFolderSyncIssues | 20 | Sync Issues folder. (Business Exchange server only) |
olFolderTasks | 13 | Tasks folder |
olFolderToDo | 28 | To Do folder |
olPublicFoldersAllPublicFolders | 18 | All Public Folders folder in Exchange Public Folders. (Business Exchange server only) |
olFolderRssFeeds | 25 | RSS Feeds folder |
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
Unhide folder in a secondary mailbox
You need to use the GetFolderPath function from https://www.slipstick.com/developer/working-vba-nondefault-outlook-folders/#GetFolderPath
To use, enter the account name and folder you need to unide.
Set oFolder = GetFolderPath("mailbox name\Deleted Items")
Public Sub ShowHiddenFolder() 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 Set oFolder = GetFolderPath("mailbox name\Deleted Items") 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
Thank you Diane for sharing your expertise.
This works great, and yes, will remove anything, including subfolders of Public Folders; and subfolders of the Favorites of the Public Folders.
Not so great, is I inadvertently ran the script not meaning to. :-(
So, I unintentionally hid a subfolder called "Watch Items" that was in the Favorites folder.
The "Watch Items" subfolder is still showing in the "Public Folders" and works there, but does not show in Favorites.
(There are about 115 subfolders in Public Folders, so a nuisance to have to scroll thru to find what you want, Favorites is a good feature).
Going to Public Folders and 're-adding' "Watch Items" to Favorites does not cause it to show.
Oh, and yes, we are fully closing, then restarting Outlook 2016 each time.
What modification to the 'unhide' script to find the correct hierarchy and etc?
It is a terminal session (HP ThinPro/Citrix) Outlook 2016 on MSserver 2012R2 , MSExchange, on Outlook365
We can only use VBA. powershell, etc is not available.
We welcome your suggestions for repair.
Thank you.
Thanks for your great instructions, Diane!
In my Outlook, I have two accounts configured:
So there are two different mailboxes.
Following your VBA instructions, I could hide some default folders using VBA in both mailboxes. But now I want to unhide a default folder in the shared mailbox shared@mail.com.
I used your suggested code from above.
This works totally fine for the first mailbox account / inbox chipy@mail.com, but I can't get it to work for the second account / shared mailbox shared@mail.com.
How do I have to change the above code to unhide folders in the second account / shared mailbox?
Thanks in advance for your support!
A somehow desperate Chipy
Worked for me with Mapi 64 bits to delete unneeded folders in an imported pst files. Thanks!
Hi Diane,
Trying to use MFCMapix64.exe to hide folders in Outlook; Notes and Tasks. Unfortunately I cannot set the hide attribute. I can copy from the Quick Step Settings, but it does not give me the ability to paste (grayed out). If I try the manual steps, I can create it, but after I click 'ok', it does not add it. Any insight?
Thank you
Hello Eric, I had exactly the same problem.
The solution for me was to downgrade MFCMapi.exe version to v21.2.21062.01 :)
Hello Diane, I'm having difficulty in finding any guidance on deleting certain system folders in the Outlook on the web app of MS 365 Bus Basic. We can clearly add and permanently delete user-created folders across all devices, but folders like RSS Subscriptions re-appear after re-opening the OWA. Found nothing in the Exchange Admin. Would MFCMAPI work for the web app or only for the desktop apps?
MFCMAPI is only for Outlook but deleting the RSS folder should sync back to outlook on the web. You need to disable RSS in Outlook before deleting the folders.
https://www.slipstick.com/outlook/how-to-remove-rss-support-from-outlook/
Hi, Diane - I am trying to find sent emails using MFCMAPI and the PR_ATTR_HiddenâĤâ attribute is not in the list? Any other suggestions please? Thank you!
The hidden property is not on all of the folders as most aren't supposed to be hidden - the lack of the property means "show folder".
Is the Sent folder hidden? If not, setting that value won't unhide the missing mail.
Can you dins the mail using search?
Thank you Diane! Thatâs what I was thinking. I can see the folder and it is empty. I am not able to find the emails using the search function. This is really important and I no longer have the account associated with the archives.. Any suggestions you may have would be greatly appreciated.
Was this exported from an IMAP account? You need to change the view on the folder or change the folder type.
Fix the Outlook Folder Type after Exporting an IMAP Account (slipstick.com)
In further thought - I was able to see the sent folder when the file is set as default in outlook. So now Iâm thinking I should change that to see if the hidden attribute appears. I cannot do this until about 6 hours from now - will update you.
Hi, Diane -
I changed the folder so it was not the default and the hidden attr is still not available. I downloaded Outlook Spy but the above info references the Imapi steps; I do not understand how to proceed in Outlook Spy.
This file is archived from another computer and server that I no longer have access to. I have archived and imported plenty of files in the past without issue, and there were no visible issues when I archived this one.
Thank you!
Gwen
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.