Search code examples
c#outlook-addin

Outlook - How to Programmatically Select a PST Folder


If I have PST folder structure like this in my Outlook

Root
   + Folder A
   - Folder B
     |- Folder 1
     |- Folder 2
   + Folder C

How do I select a folder programatically so that the folder appears selected and outlook pane shows content of that folder in C#?

For example in above structure, if I say right click on Folder C and click on a context menu "Go To Folder A", how do I select Folder A programatically?


Solution

  • Consider setting Application.ActiveExplorer.Folder to the folder you want selected.