Image compression using VBA


R

Robertico

How can i compress all images form a document using VBA.
Already tried the Macro recorder, but no luck :-(

Thanks in advance,

Robertico
 
Ad

Advertisements

J

Jonathan West

Which version of Office are you using? The possible solution depends on
this.
 
J

Jonathan West

Robertico said:
Microsoft Office (Word) 2003 (11.6502.6408) SP1

OK, in that case the following line of code will bring up the Compress
Pictures dialog, allowing the user to decide what compression to apply

Commandbars.FindControl(Id:=6382).Execute
 
R

Robertico

OK, in that case the following line of code will bring up the Compress
Pictures dialog, allowing the user to decide what compression to apply

Commandbars.FindControl(Id:=6382).Execute

I need to set this all by VBA, without any user interaction !

Regards,

Robertico
 
J

Jonathan West

Robertico said:
I need to set this all by VBA, without any user interaction !

Regards,

Robertico

I think you may be out of luck. Unfortunately, that dialog is not a member
of the dialogs collection, and so cannot be automated.

About the only thing I can suggest is that you use Sendkeys to try and
simulate keypresses to the dialog.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
Ad

Advertisements

R

Robertico

Jonathan,
I think you may be out of luck. Unfortunately, that dialog is not a member
of the dialogs collection, and so cannot be automated.

Thanks anyway !.

Robertico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top