L
Lazzaroni
I am attempting to retrieve the dimensions of an image before I insert the
image into a spreadsheet as a thumbnail so that I can scale the image
accurately.
Dim objShell As New Shell
Dim objFolder As Folder
Dim objFile As ShellFolderItem
Set objFolder = objShell.NameSpace(<path to file>)
Set objFile = objFolder.ParseName(<file name>)
MsgBox objFile.ExtendedProperty("Dimensions")
The above code does not seem to be working because the method "ParseName" is
not found. I have enabled the reference to "Microsoft Shell Controls and
Automation" but still no go.
Does anyone know how to enable ParseName, or have a better way of retrieving
image dimensions?
Thank you.
image into a spreadsheet as a thumbnail so that I can scale the image
accurately.
Dim objShell As New Shell
Dim objFolder As Folder
Dim objFile As ShellFolderItem
Set objFolder = objShell.NameSpace(<path to file>)
Set objFile = objFolder.ParseName(<file name>)
MsgBox objFile.ExtendedProperty("Dimensions")
The above code does not seem to be working because the method "ParseName" is
not found. I have enabled the reference to "Microsoft Shell Controls and
Automation" but still no go.
Does anyone know how to enable ParseName, or have a better way of retrieving
image dimensions?
Thank you.