Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Directory Tree using Excel/VBA - Retrieve Author/Owner Details as well as file attributes..

Posted on 2010-01-11
9
Medium Priority
?
1,525 Views
Last Modified: 2012-05-08
Hi.
I have the attached file which was a download from another website where it works like directory tree generator.
This works great however I would like it to also display Author/Owner details of the file if applicable/available (i.e if it is an office file), (File->Properties->Author from Word, Excel, Access menu) - Is this possible, just to add a column at the end? Would the VBA need to actually open each file to get the information?

Many thanks,
DirectoryTree.xls
0
Comment
Question by:jasocke2
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 26282559
It is possible to scale the application up BUT it will need to open each office file in turn to get the data and this will slow things up quite a lot per file.

Chris
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 26282615
If you have the dsofile.dll (downloadable from MS) then you won't need to open the files, which should speed things up.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 26282631
Follow-up: you can download it from here: http://support.microsoft.com/kb/224351
Regards,
Rory
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 50

Expert Comment

by:Dave Brett
ID: 26282633
It's a bit late for me to start modifying this code but you can use Shell to get these detals - and more - without opening the file

My code at vbax , http://www.vbaexpress.com/kb/getarticle.php?kb_id=405 runs a recursive search to make the tree for

"Path" ,"File Name" ,  "Last Accessed" , "Last Modified" ,  "Created" ,  "Type" ,  "Size" ,   "Owner" ,   "Author" ,  "Title" ,   "Comments"

this code offers 2 benefits over the code you have posted
- it will work in xl2007. The code you have posted uses FileSearch which MSFT removed in 2007.
- it uses arrays rather than cell by cell writes so will be much quicker for long lists

Cheers
Dave
0
 
LVL 50

Accepted Solution

by:
Dave Brett earned 2000 total points
ID: 26282642
Copy of my workbook from the link above

Cheers
Dave

FileAtt-KB17-.zip
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 26282671
Takes foot from mouth to splutter!, some more research for me to undertake.

Chris
0
 

Author Closing Comment

by:jasocke2
ID: 31675458
Couldn't be more spot on! Thanks
0
 

Author Comment

by:jasocke2
ID: 26282950
Thanks for all your answers, brettdj's answer served me well! Thanks.
0
 
LVL 50

Expert Comment

by:Dave Brett
ID: 26291070
thx for the grade :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question