Public Function GetFileProperty(filePath As String, idx As Integer) As String
'
'Valeurs possible de idx :
' 0 --> Name
' 1 --> Size
' 2 --> Type
' 3 --> Date Modified
' 4 --> Date Created
' 5 --> Date Accessed
' 6 --> Attributes
' 7 --> Status
' 8 --> Owner
' 9 --> Author
' 10 --> Title
' 11 --> Subject
' 12 --> Category
' 13 --> Pages
' 14 --> Comments
' 15 --> Copyright
' 16 --> Artist
' 17 --> Album Title
' 18 --> Year
' 19 --> Track Number
' 20 --> Genre
' 21 --> Duration
' 22 --> Bit Rate
' 23 --> Protected
' 24 --> Camera Model
' 25 --> Date Picture Taken
' 26 --> Dimensions
' 27 --> Not used
' 28 --> Not used
' 29 --> Not used
' 30 --> Company
' 31 --> Description
' 32 --> File Version
' 33 --> Product Name
' 34 --> Product Version
'
Dim objFolder As Object, theFile As Object
Set theFile = CreateObject("Scripting.FileSystemObject").GetFile(filePath)
Set objFolder = CreateObject("Shell.Application").Namespace(CStr(theFile.ParentFolder))
GetFileProperty = objFolder.GetDetailsOf(objFolder.ParseName(theFile.Name), idx)
Set objFolder = Nothing: Set theFile = Nothing
End Function