I found this macro to get some information from files in a folder, the folder I have has pictures in it and I want to get the date the picturs were taken, this is putting in some kind of date but it is not when they were taken.
How would I do that, I am using Excel 2003 if that helps
Thanks
How would I do that, I am using Excel 2003 if that helps
Thanks
Code:
Sub listfiles()
Dim r As Integer, F As String, Directory As String
Directory = Application.DefaultFilePath _
& "\My Pictures\Old Building And Things\"
r = 1
Cells(r, 1) = "FileName"
Cells(r, 2) = "Size"
Cells(r, 3) = "Date Time"
Range("A1:c1").Font.Bold = True
'Get Directory
F = Dir(Directory) ', 7)
Do While F <> ""
r = r + 1
Cells(r, 1) = F
Cells(r, 2) = FileLen(Directory & F)
Cells(r, 3) = FileDateTime(Directory & F)
'Get next File
F = Dir()
Loop
End Sub