![]() |
|
|
|
#1
|
||||
|
||||
|
Quote:
https://www.msofficeforums.com/159753-post1.html RRB seems committed to not encouraging support... The following Excel macro will generate a plethora of attributes for every file in whatever folder you point it at. Code:
Sub ExtractFilePropeties()
Dim objShell As Object, objFolder As Object ' Shell & Folder
Dim strFldr, strFlNms, r As Long, c As Long
strFldr = GetFolder & "\": If strFldr = "\" Then Exit Sub
r = 1
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFldr)
With objFolder
For c = 0 To 320
Cells(r, c + 1) = .GetDetailsOf(.Items, c)
Next
Exit Sub
For Each strFlNms In .Items
r = r + 1
For c = 0 To 320
Cells(r, c + 1) = objFolder.GetDetailsOf(strFlNms, c)
Next
Next
End With
End Sub
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
||||
|
||||
|
I sincerely apologize if I mistakenly said anything which appeared "negative". I truly and sincerely admire and respect the helpers here as well as appreciate their support.
-=-=-=-=-= Regarding my question: I realize that Word is not the right tool for doing something like this. But Access (which I have some experience developing in) seemed a little bit of an over-kill. All I need is a table with three cells. Also the PC I was supplied with doesn't have Access (or Excel) on it, only Word. Again thank you all |
|
#3
|
||||
|
||||
|
More properly, a table with three columns (until you find out what other data are available
). Do be aware that Word tables are real performance hogs.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Changing Link on Audio Files on Startup
|
mikbro1215 | Word VBA | 5 | 03-12-2020 01:45 PM |
| Can a I create an index in a word document where index entries control sections of the document? | pfriorda | Word | 3 | 12-28-2017 08:02 PM |
| msw 2007 ver 12-how do i create a audio link? | ss1133 | Office | 0 | 03-27-2012 09:07 AM |
| Cannot insert audio files unless speakers/headphones are present. HELP! | brennj4 | PowerPoint | 0 | 01-04-2012 11:05 AM |
PPT 2010 will only insert, not link to audio files.
|
kevin3d | PowerPoint | 1 | 10-07-2011 09:17 PM |