Microsoft Office Tutorials and References
In Depth Information
Creating a Folder Tree Menu
Creating a Folder Tree Menu
This procedure displays the contents of a folder and its sub-folders as a drop-
down menu and demonstrates how to create drop-down menus (pop-ups).
Example file:
MenuTree
Scenario: Microsoft provides the My Documents folder for
storing the files. If you regularly work with more than 20 files
or so, it's not expedient to have them all listed together in
the same place. Generally, files get organized in sets of
folders, according to a criterion—by project, for example—so
that they can be found more easily.
The drawback to being organized this way is that it takes
longer to navigate through the folder paths when you need
to open a file. Displaying the contents of a set of folders in
drop-down menus helps to quickly find and choose the file
that is needed: the menus open up automatically when the
mouse hovers over them—no clicking required except for
selecting the file to work with.
Selecting a file will open it in Word or insert it in the current
document, as appropriate for the file type.
Wrd
The following macro drills down through a folder structure to up to three levels
and presents a list of all Word, Excel, PowerPoint, plain text, HTML, RTF, and
graphics files in each folder. When an entry is selected, the Word, text, HTML
or RTF file will be opened; Excel, PowerPoint, and graphics files will be
embedded in the current document as objects.
In addition, for Word 2002 or Word 2003, an icon designating the file type next
to the filename can be displayed.
View the Appendix to learn how to store this procedure
in a Standard module.
Option explicit¶
' * * * * *¶
Const BaseFolderPath As String = "C:\Test\"¶
Const ToolbarTarget As String = "Menu Bar"¶
Const ButtonName As String = "My Files"¶
 
Search JabSto ::




Custom Search