Option Explicit
Option Compare Text
Sub FindFolders()
Dim SearchString As String
SearchString = InputBox("Enter a Folder name substring")
If SearchString <> "" Then
Dim Note As NoteItem
Set Note = CreateItem(olNoteItem)
ProcessFolder Session.Folders.GetFirst, SearchString, Note
Note.Width = 800
Note.Display
End If
End Sub
Function GetPath(Folder As Outlook.MAPIFolder) As String
On Error GoTo Finally
GetPath = GetPath(Folder.Parent) + "/" + Folder.Name
Exit Function
Finally:
GetPath = "/" + Folder.Name
End Function
Sub ProcessFolder(CurrentFolder As Outlook.MAPIFolder, SearchString As String, Note As NoteItem)
If InStr(CurrentFolder.Name, SearchString) > 0 Then
Note.Body = Note.Body + GetPath(CurrentFolder) + Chr(10)
End If
Dim olNewFolder As Outlook.MAPIFolder
For Each olNewFolder In CurrentFolder.Folders
ProcessFolder olNewFolder, SearchString, Note
Next
End Sub
Bria wrote:
I have never received an adequate answer to my question.
29-Jan-09
I have never received an adequate answer to my question. I have found one
rather clever but labor-intensive solution:
1. Use Advanced Find to locate an e-mail known to be in the lost folder
2. Note the folder name
3. Expand all folders (highlight the Personal Folders or other top-level
node, and press * to expand one level at a time)
4. Repeatedly type the first letter of the lost folder name so that the
focus will drop down through all the folders beginning with that letter,
eventually landing on the target.
http://discussions.virtualdr.com/archive/index.php/t-165939.html
This is not an elegant solution, but might provide a brute-force solution
for finding a lost folder...
:
Previous Posts In This Thread:
Find folder in tree
Outlook 2003
How do I find a folder by name?
I have a heavily-nested folder set, and I just got several new e-mails that
need to go in a sub-sub-sub folder somewhere, but I cannot find the folder -
only other messages in that folder (using Advanced Find).
Actually, my folder tree is very deliberately and thoughtfully well-organized
Actually, my folder tree is very deliberately and thoughtfully well-organized
as any good outline would be organized, with parallel concepts at each level
within a node.
I have almost 1 GB of storage, and only about 50 messages in my Inbox. The
rest is organized into, as I mentioned, folders comprising a multi-level tree.
Besides that, I provide support for users that occasionally drag-and-drop a
folder into the wrong area accidentally. The user does not remember the name
of the folder, but does remember something of an item in the folder. We can
then find the individual message, but have no way to locate the folder
containing it.
One issue is that I may have many folders with the same name (e.g. Current
Projects) in different nodes (e.g. Customer #1 -> Current Projects, Customer
Alternatively, I could have Current Projects -> Customer #1 and Completed
Projects -> Customer #1.
Either way, I have two folders with the same name (either Current Projects
or Customer #1). This is, of course, very simplified for this post. I have a
lot of work to do, a lot of project-critical messages, and it all requires
complex thoughts & therefore clearly delineated storage structures.
This normally prevents any need for searching; however, when I remember a
small part of the content of an e-mail and need to search by it, and it comes
up in folder Completed Projects, it could be any of a dozen or more.
It would, of course, be ridiculous to preface the name of each folder with
the name of its parent folder (except to accomodate the inability to find the
folder name); that defeats much of the purpose of a nested storage structure
in the first place.
It just seems odd to me that MS does not provide the path to the folder
relative to the tree. This problem is the same one found in some help files.
When one searches, one can find a small snippet of help, but no way to find
the context of the object for which the help is requested, such as the name
of the form for which the help item pertains.
Now...if there were just a way to search by folder name and not just item
contents, it would make this easier.
:
Honestly, the best answer is 'You need to redo your organization scheme.
Honestly, the best answer is 'You need to redo your organization scheme.'
If you're not able to find a folder, then it's not a good organization scheme.
There may be an Outlook add-in that allows you to print out the folder tree,
but I can't find one anymore.
--
f.h.
Microsoft Outlook MVP
I absolutely agree with you Brian, you should be able to find a folder by name.
I absolutely agree with you Brian, you should be able to find a folder by
name. I just dragged a folder into another folder by mistake and now I cannot
seem to find it.
:
I have never received an adequate answer to my question.
I have never received an adequate answer to my question. I have found one
rather clever but labor-intensive solution:
1. Use Advanced Find to locate an e-mail known to be in the lost folder
2. Note the folder name
3. Expand all folders (highlight the Personal Folders or other top-level
node, and press * to expand one level at a time)
4. Repeatedly type the first letter of the lost folder name so that the
focus will drop down through all the folders beginning with that letter,
eventually landing on the target.
http://discussions.virtualdr.com/archive/index.php/t-165939.html
This is not an elegant solution, but might provide a brute-force solution
for finding a lost folder...
:
Submitted via EggHeadCafe - Software Developer Portal of Choice
Exploring the Singleton Pattern
http://www.eggheadcafe.com/tutorial...2-7c7cf5b5cb2d/exploring-the-singleton-p.aspx