Problem working with foldere below inbox

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

I am writing a function to process a folder that is a sub-folder of
"Inbox."
I can identify inbox and work with it, using the following code.
However, I have been unable to obtain a list of folders, and cannot figure
out how to connect to the Inbox sub-folder "MySubFolder"

Any suggestions would be helpful,

Below is the code that works
'Open or attach to Outlook
Set oApp = New Outlook.Application
Set oNameSp = oApp.GetNamespace("MAPI")

'Attach to the appropriate folders
Set oFoldMail = oNameSp.GetDefaultFolder(6) '6=Inbox

thanks

keith
 
Back
Top