Compress a picture using VB6

vb6 Lebanon
  • 12 years ago

    Hi,

     

    Does any one have an idea on how to compress a picture programmatically?

     

    What am doing is inserting pictures into Microsoft word through VB6 and I want to control the size of those pictures, and compress it if needed.

    Even though there is a utility for compressing images in office applications I wasn’t able to extract the code through recording a macro.

     

    Any assistant or ideas would be highly appreciated.

  • 12 years ago

    You can use one of those OCX files to compress your pictures
    download it from
    here

    Regards
    DoctorMahdi

  • 12 years ago

    Some time ago I tried to do similar things with pictures in PowerPoint and discovered the same: some of the newer features with pictures are only available through the UI, and not in VBA.  I guess your only option is to add a control in your VB6 app, check and compress if needed there, and then insert the picture.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter” - Eric Raymond