Hi Colin,
It's working great. Thank you so much. As I only need a few bits of data, I've added the Shell Controls and automation reference and here's an example. I know there's LOTS more you have available, of course.
Thanks again.
Code:
Function fImageData(strFilePath As String, lngType As Long) As String
On Error GoTo Err_Proc
Dim strFileName As String
Dim strPath As String
Dim objShell As shell32.Shell
Dim objFolder As shell32.Folder
Dim objFolderItem As shell32.FolderItem
Dim strPropName As String
Dim strPropValue As String
strFileName = Mid(strFilePath, InStrRev(strFilePath, "\") + 1)
strPath = Left(strFilePath, Len(strFilePath) - Len(strFileName) - 1)
Set objShell = New Shell
Set objFolder = objShell.NameSpace(strPath)
Set objFolderItem = objFolder.ParseName(strFileName)
strPropName = objFolder.GetDetailsOf(objFolder.Items, lngType)
strPropValue = objFolder.GetDetailsOf(objFolderItem, lngType)
fImageData = strPropName & ": " & strPropValue
Exit_Proc:
Set objShell = Nothing
Set objFolder = Nothing
Set objFolderItem = Nothing
Exit Function
Err_Proc:
Select Case Err.Number
Case Else
MsgBox "Error in ModImageData, fImageData " & Err.Number & " " & Err.Description, vbCritical, "Error", Err.HelpFile, Err.HelpContext
Resume Exit_Proc
End Select
End Function