View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Yandl Steve Yandl is offline
external usenet poster
 
Posts: 284
Default Get Dimensions of Image File Outside Excel

If you check out the link below, I have a script that uses the
"Shell.Application" object to retrieve the dimensions of various types of
picture files as part of the process. You will have to wade through the
other stuff it's doing but it should be easy enough to incorporate. The key
is going to be that you will first need to retrieve the complete file name
including the path (I use WScript arguments as the script is designed so the
user can drag the picture into the file and have it do its thing). I'm
still running WinXP and Excel 2003 so I won't presume to be able to share
exactly how you will need to approach file name retrieval.
http://www.microsoft.com/technet/scr.../cscme009.mspx


Steve Yandl



"Lazzaroni" wrote in message
...
Does anyone know how to retrieve the image size (width and height) in
pixels
of an image that is not inside a spreadsheet?

When I hover my mouse pointer over images on my desktop the image size
pops
up in Windows Vista, but I don't know how to retrieve this particular
attribute of the file from inside Excel 2007.

Thank you.