Quote:
Originally Posted by Guessed
Note that when you tell me that my previously supplied solution is inelegant then you will find that I'm going to expect you to do a lot more of the pre-work.
|
Indeed, given the negative attitude displayed here:
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
I'll let RRB tailor it to just the attributes sought. Hint:
Word 365 for Mac - Programatically control date fields without opening - Microsoft Community