1

I have created a pst store where the folder structure will be managed by my addin.

Is it possible to remove or hide the "Deleted Items" and "Search Folders" folders ?

braX
  • 11,506
  • 5
  • 20
  • 33

2 Answers2

0

No, Outlook always recreates these folders even if you delete them.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
0

To hide, see example on vba

Option Explicit
Private Sub Hide_Folders()
    Dim Outlook_Folder As Outlook.folder
    Dim oPA As Outlook.PropertyAccessor
    Dim Prop_Name, Value, Folder_Type As String

    Prop_Name = "http://schemas.microsoft.com/mapi/proptag/0x10F4000B"

    Value = True ' hide

    Set Outlook_Folder = Application.ActiveExplorer.CurrentFolder

    Debug.Print Outlook_Folder.Name

    Set oPA = Outlook_Folder.PropertyAccessor

    oPA.SetProperty Prop_Name, Value

    Set Outlook_Folder = Nothing
    Set oPA = Nothing
End Sub
0m3r
  • 12,286
  • 15
  • 35
  • 71