I have the following C# Code
Microsoft.Office.Interop.Outlook.Application myApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook._NameSpace mapiNameSpace = myApp.GetNamespace("MAPI");
Microsoft.Office.Interop.Outlook.MAPIFolder myInbox = mapiNameSpace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
With it I can access my Inbox. Great! Now I need to access the CTPend folder that lives on the same level as the Inbox. I cannot figure out how to do that. I keep cycling through things I can call that send me folders but won’t let me pick one and objects that specify a folder, with no method that generates one. Help.
Go up one level to the Inbox folder, then to that folder:
anotherfolder = myInbox.Parent.Folders("CTPend")
or use the parent store and drill down to that folder starting with the root folder of that store:
store = myInbox.Store
anotherfolder = store.GetRootFolder.Folders("CTPend")