Obtaining file properties via VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a couple of questions. I hope it is ok to post them togather.

Q1. I store the location of images (in gif or jpg format) in a table field
using the file picker, and need to store the image dimensions (height and
width) in the same table. Can anyone tell me if it is posible to get this
information using vba, in a simular way that you can right click a file in
windows explorer, choose properties and see the information.

Q2. I am trying to use a unbound frame to display the above image on a form
using the field containing the image lcation but this does not work. Any
suggestions would be most welcomed.
 
Q2. I am trying to use a unbound frame to display the above image on a
form
using the field containing the image lcation but this does not work. Any
suggestions would be most welcomed.

use image control and its picture property to set path to image
 
Alex,
Your answer actually helped to solve Q1 as well. Having assigned the image
to the picture property of the image control, I found there is also an
"ImageWidth" and "ImageHeight" property (read only in Twips) that I could use
to achive the desired result. Now I just need a formula to convert twips to
pixels.


Thanks
 
Back
Top