Menu that is a copy of a folder structure

F

Flemming Dahl

Hi all

I have a folder "D:\Docs" which contains a lot of documents, subfolder with
subfolders and even more documents.

I would like some code that could create me a menuitem that contains a full
copy of the folder structure with the documents where the documents are
menuitems and the folders are submenus.

I hope that someone have this code and will send it to me.

Thanks,
Flemming
 
H

Helmut Weber

Hi Flemming,

it's already there.
Like this:

Sub Myfileopen()
Dim oDlg As Dialog
Set oDlg = Dialogs(wdDialogFileOpen)
oDlg.Name = "c:\documents and settings\all users"
oDlg.Show
End Sub

Otherwise, for studying purposes, see:

http://mypage.bluewin.ch/reprobst/WordFAQ/OnAction.htm#OnAction0603

for creating cascading menue items as a start.
Not to speak of how to get the cascading levels (by recursion)
and of some more tricky stuff. And, once you got the structure,
just displaying it would not be the end of the story.

Greetings from Bavaria

Helmut Weber, MVP
"red.sys" & chr$(64) & "t-online.de"
Win XP, Office 2003
 
F

Flemming Dahl

Hi Helmut

The dialog is the quick way, but not what i need. I need the fullblown
folderstructure within a menuitem right next to help.

I do not get much from your code examples.

Flemming
 
F

Flemming Dahl

Hi Jezebel

When I have the code to create the menu structure then at belive that i can
code the OnAction. The OnAction will typical be the same on all documents -
call my Public Sub MyAction()

Flemming
 
H

Helmut Weber

Hi Flemming,

the code shows how to build cascading menues programmatically.
You have to analyze the folder structure and create
submenues for each directory you find and ordinary
menue items for each file. For analyzing the structure
you may use the recursive "dirdiver", posted in several variations
and in several groups. Nice little project, but probably
somewhat limited to rather private use. I got folders trees
with some 10,000 and more files.

Greetings from Bavaria

Helmut Weber, MVP
"red.sys" & chr$(64) & "t-online.de"
Win XP, Office 2003
 
F

Flemming Dahl

Thanks Helmut

I know it is a nice little project and therefore I was hoping that someone
had done this before....

It about 150-200 documents in in 20-30 folders in 3-4 levels from the
folderroot.

I guess I have to get the working gloves on! Bugger *s*

Cheers,
Flemming, Denmark
 

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