|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub ls()
Dim Fso As Scripting.FileSystemObject
Dim oFolder As Folder
Dim oFile As File
Dim Img As WIA.ImageFile
Set Fso = CreateObject("Scripting.FileSystemObject")
Set oFolder = Fso.GetFolder(ThisWorkbook.Path)
Debug.Print oFolder.Name, oFolder.Path
For Each oFile In oFolder.Files
With oFile
If InStr(.Type, "JPG") > 0 Then
Debug.Print .Name, .DateCreated, .DateCreated, .DateLastModified
Set Img = CreateObject("WIA.ImageFile")
With Img
.LoadFile oFile.Path
With .Properties("GpsLatitude").Value
Debug.Print .Item(1).Value,
Debug.Print .Item(2).Value,
Debug.Print .Item(3).Value
End With
End With
End If
End With
Next oFile
End Sub |
|