I'm on Outlook 2003 SP3 using Exchange 2003. I'm not using any .PST. In my profile I have my mailbox and an additional mailbox I setup through Tools | Accounts | View (mine) | Change | More Settings | Advanced | Add...
So, now in my Navigation Pane I have two mailboxes. This second mailbox is a collection of folders and nested subfolders many levels deep in some cases.
If I need to find a series of emails to do research, I do a search and the search results screen tells me the folder where the email I want is located. But, that may not be the email I need. Maybe I need to go to the folder that contais that email and read through the emails and analyze the info, etc.
The problem is that there can be 10 or more folders with the same name, all in different subfolders, different branches. So, just knowing the containing folder doesn't help. I need the full path.
I found a snipet of code that I think might help, but it's only giving me the root folder \\mailbox\Doe, John\Inbox. I need it to go deeper and return the full path, including all subfolders. Is this possible?
Here's the code I'm using:
I hope I've explained the problem well, but if you need more information, please let me know. I would like to figure this out.
So, now in my Navigation Pane I have two mailboxes. This second mailbox is a collection of folders and nested subfolders many levels deep in some cases.
If I need to find a series of emails to do research, I do a search and the search results screen tells me the folder where the email I want is located. But, that may not be the email I need. Maybe I need to go to the folder that contais that email and read through the emails and analyze the info, etc.
The problem is that there can be 10 or more folders with the same name, all in different subfolders, different branches. So, just knowing the containing folder doesn't help. I need the full path.
I found a snipet of code that I think might help, but it's only giving me the root folder \\mailbox\Doe, John\Inbox. I need it to go deeper and return the full path, including all subfolders. Is this possible?
Here's the code I'm using:
Code:
Public Sub Findpath()
Dim myRecipient As Outlook.Recipient
Dim olFolder As Outlook.MAPIFolder
Set myolapp = CreateObject("Outlook.Application")
Set myNamespace = myolapp.GetNamespace("MAPI")
Set myRecipient = myNamespace.CreateRecipient("Doe, John")
Set olFolder = myNamespace.GetSharedDefaultFolder(myRecipient, olFolderInbox)
MsgBox olFolder.FolderPath
End Sub
I hope I've explained the problem well, but if you need more information, please let me know. I would like to figure this out.