Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a VBA code to copy selected word files

Status
Not open for further replies.

adfo

Programmer
Oct 23, 2009
30
US
I have a main folder located on the c: drive contains about twenty (20) subfolders. Each subfolder contains between 5 to 20 word files.

I need to create a form with VBA code (within Excel or word) to do the following:

1- Shows all the subfolders (i.e. tree view or list with check boxes, etc.). Allow user to choose what subfolders will be needed (i.e. check off or highlight the required subfolders)

2- Show the word files’ names which are located in the selected subfolders above (I think this could be also a tree view or list with check boxes, etc.). Allow user to choose what files are needed within the selected subfolders

3- Finally, copy only the selected files and their parent folders into another destination on the hard drive maintaining the same file/folder structure (i.e. only the selected files and parent folders).

I appreciate any help
 
This seems overly ambitious for VBA. In theory it could be done, but it seems crazily overkill, especially trying to maintain the same file/folder structure.

 
What is the current folder structure? Populating list boxes etc based on selections is easy enough with the common dialogue control but we need more information on the current directory structure and what the end result would be, give path examples

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work" <<Edison>>
 

Did your teacher tell you what would be the real life situation for this excercise?

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top