Seemingly the "Debug.Print newName" line is executed 0 times, so the loop is not entered, however there are JPG images and the folder exists. Thank you very much for your idea, I am lost at this one!
VBA Code:
Sub RenameImages()
Dim fs As FileSystemObject
Dim folder As folder
Dim file As file
Set fs = New FileSystemObject
Set folder = fs.GetFolder("C:\myfolder") ' Replace with the path to your folder
For Each file In folder.Files
If file.Type Like "JPG Image*" Then
Dim image As Object
Set image = CreateObject("WIA.ImageFile")
image.LoadFile file.Path
' Compute the new file name
Dim newName As String
newName = file.Name & " - " & image.Size & " - " & image.Width & "x" & image.Height
' Rename the file
file.Name = newName
Debug.Print newName
End If
Next
End Sub