Hi, my workbook have worked fine for a long time, suddenly my code can't read the proper file properties.
Using: Set objShell = CreateObject("Shell.Application") ...
Dim j As Integer
For j = 0 To 30
Debug.Print j & " " & objFolder.GetDetailsOf(objFolderItem, j)
Next
This code runs and shows the name of the file, size and dates. But it does not show 'Comments' or any other file properties, like it used to do. And yes, I've checked that my files have comments
Anyone else getting this bug?
Edit, complete code:
Sub GetFileProperties()
Dim arrHeaders(35)
Path = PATH HERE
file = FILE NAME HERE
Set oFolder = CreateObject("Shell.Application").Namespace(Path)
For i = 0 To 34
arrHeaders(i) = oFolder.GetDetailsOf(oFolder.items, i)
Next
For i = 0 To 34
Debug.Print i & " " & arrHeaders(i) & ": " & oFolder.GetDetailsOf(oFolder.items.Item(FILE), i)
Next i
End Sub
Bookmarks