#1
|
|||
|
|||
Indexing folders
Hi
I find scrolling through the Outlook folders very tiresome. Is anyone aware of an Outlook addon that allows one to access outlook folders via an alphabetic index. For example, if I want to access an outlook folder with the name of Zephyr, I click on the letter "Z" in the index and the folders scroll to the Zephyr folder. Regards Leonard |
#2
|
||||
|
||||
Assuming the folders are sub folders of your inbox then import the attached userform into Outlook and use it to access any folder by initial letter.
Call it with a macro Code:
Sub Macro1() frmFolders.Show End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com Last edited by gmayor; 07-11-2020 at 11:22 PM. |
#3
|
|||
|
|||
Indexing folders
Thanks, but I need to access folders in Outlook, not in Inbox
|
#4
|
||||
|
||||
Which folders?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
I have scores of folders I have created.
They are not reside under the Inbox |
#6
|
||||
|
||||
Where do they reside?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#7
|
|||
|
|||
under "Outlook"
|
#8
|
|||
|
|||
at the same level as "Inbox"
Also, I need to enter the first character of the folder name for outlook to jump to the first folder starting with that character. At the moment I spend ages scrolling through my folders. Ideally indexing something like under "address book" with an alphabet list |
#9
|
||||
|
||||
If they are on the same level as Inbox then replace the three macros below in the userform code and it will display all the folders (and subfolders) on the same level as inbox by initial letter: Code:
Private Sub lstFolders_DblClick(ByVal Cancel As MSForms.ReturnBoolean) Dim olFldr As Folder Dim vFolder As Variant Dim i As Integer Set olFldr = Session.GetDefaultFolder(olFolderInbox).Parent vFolder = Split(lstFolders.Text, "\") For i = 0 To UBound(vFolder) Set olFldr = olFldr.folders(vFolder(i)) Next i Hide olFldr.Display lbl_Exit: Set olFldr = Nothing Unload Me Exit Sub End Sub Private Sub CommandOK_Click() Dim olFldr As Folder Dim vFolder As Variant Dim i As Integer If lstFolders.ListIndex > -1 Then Set olFldr = Session.GetDefaultFolder(olFolderInbox).Parent vFolder = Split(lstFolders.Text, "\") For i = 0 To UBound(vFolder) Set olFldr = olFldr.folders(vFolder(i)) Next i Hide olFldr.Display Else Beep MsgBox "Nothing selected" End If lbl_Exit: Set olFldr = Nothing Unload Me Exit Sub End Sub Private Sub ResetList(X As String) Dim cFolders As Collection Dim olfolder As Outlook.Folder Dim SubFolder As Outlook.Folder Dim olNS As Outlook.NameSpace Dim strPath As String Dim sSubPath As String Dim sStore As String lstFolders.Clear Set cFolders = New Collection Set olNS = GetNamespace("MAPI") cFolders.Add olNS.GetDefaultFolder(olFolderInbox).Parent Do While cFolders.Count > 0 Set olfolder = cFolders(1) cFolders.Remove 1 sStore = olfolder.Store sSubPath = Replace(olfolder.FolderPath, "\\" & sStore & "\", strPath) ProcessFolder olfolder, sSubPath, X If olfolder.folders.Count > 0 Then For Each SubFolder In olfolder.folders cFolders.Add SubFolder Next SubFolder End If Loop lbl_Exit: Set olfolder = Nothing Set SubFolder = Nothing Set cFolders = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#10
|
|||
|
|||
Thanks so much - I'll give it a try when I'm fully awake
|
#11
|
||||
|
||||
I have updated the userform to allow the selection of folders that begin with a number, so if you have already downloaded, do so again to get the updated form.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#12
|
|||
|
|||
Indexing folders
Hi Graham
Thanks for the detailed response and the code. However, the routine "ProcessFolder" appears to be missing. Please send it to me. Regards Leonard |
#13
|
|||
|
|||
I'm running Office 10 and am seeing lots of errors
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Indexing | Holger Rudbeck | Word | 2 | 05-02-2020 03:13 PM |
Indexing whole document | Matt Rance | Word | 8 | 11-06-2012 06:05 AM |
Auto Indexing | won052 | Word | 1 | 07-27-2012 11:43 AM |
Indexing - Subentries | godofpool | Word | 1 | 07-09-2012 11:28 AM |
Auto indexing | tomsan | Word | 1 | 03-05-2012 03:54 PM |