1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Sub Macro3()
Dim det_Headers(35)
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\ XXXXX")
Workbooks(1).Sheets(2).Activate
For i = 0 To 34
det_Headers(i) = objFolder.GetDetailsOf(objFolder.Items, i)
ActiveSheet.Cells(1, i + 1) = det_Headers(i)
Next
Workbooks(1).Sheets(2).Activate
j = 2
For Each strFileName In objFolder.Items
For i = 0 To 34
Sheets(2).Cells(j, i + 1).Value = objFolder.GetDetailsOf(strFileName, i)
Next
j = j + 1
Next
End Sub |
Partager