Compress/Reduce Size of Picture in KB's RRS feed

  • Question

  • I have a database in which user need to add products with a picture of each product. I have make it restricted that if the file size increases 1 MB then it will not allow to update the picture to OLE. Well What I wanna do is to compress/re-size picture to convert the file size to make it easier for users. Can I do it with VBA?



    Regards, Wasif Shahid ACCEDER software

    Friday, May 29, 2015 8:46 AM

All replies

  • Hi Wasif,

    This forum is for Developer discussions and questions involving Microsoft Access. In my option, there is no Access Object Model to compress picture directly. For achieve it with VBA, I will move this thread to the more related forum.


    Thanks for your understanding.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 1, 2015 2:15 AM
  • I had to do something similar for a client.  They had 100's of photos they needed needed in a Word doc and they needed to email the PDF so the doc needed to be less than 20Mb.  All their pics were taken with 4M pixel cameras and were way too large.  I figured out that 96 dots per inch printed fine for them.  They wanted the option of putting 2, 4 or 6 pics/page.  I determine what that translated to in horizontal and vertical pixels.  I use ImageMajick (free) to resize pic to the right size.  Imagemajick has a COM interface so I call it directly from VBA.  You can also use Win32 commands.  This reduced the size of the file by 20X.  Without resizing I think the doc becomes unmanageable. Here is what the command would look like:

    cmd = "convert " & fileOrig & " -resample 96x96 -resize 506x375 " & fileMin

    • Edited by mogulman52 Monday, June 1, 2015 12:27 PM
    Monday, June 1, 2015 12:16 PM