Finding other folders in Outlook

R

Richard Ferguson

Hi All,

I'm currently using the following code to access another Outlook 2000
mailbox (other than my own) to create new folders underneath. All works ok
so far.

Set mynamespace = Outlook.Application.GetNamespace("MAPI")
Set MailBox = mynamespace.CreateRecipient([email protected])
Set InboxFolder = mynamespace.GetSharedDefaultFolder(MailBox, olFolderInbox)
Set NewFolder = InboxFolder.Folders.Add("NewlyCreatedFolder")


However, this works ok for the default Inbox folder of this mailbox. I have
other folders manually created directly underneath the mailbox (when viewing
it in Outlook) eg, Calendar, Contacts, Sent Items etc, I have also added
folders such as Test, Procedures, Statistics at the same level. If these
folders were beneath the Inbox, I can find them no problem, but is there a
way to search and create folders up one level at the same heirarchial level
as Inbox, Contacts, Calendar, etc (hope this isn't too confusing.

Cheers,

Richard Ferguson.
 
S

Sue Mosher [MVP-Outlook]

Each folder has a Parent property representing its parent folder. Sounds
like you want to create folders in the Inbox's Parent.Folders collection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top