Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Image compression using VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robertico - 01 Oct 2005 11:06 GMT
How can i compress all images form a document using VBA.
Already tried the Macro recorder, but no luck :-(

Thanks in advance,

Robertico
Jonathan West - 01 Oct 2005 12:43 GMT
Which version of Office are you using? The possible solution depends on
this.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

> How can i compress all images form a document using VBA.
> Already tried the Macro recorder, but no luck :-(
>
> Thanks in advance,
>
> Robertico
Robertico - 03 Oct 2005 17:34 GMT
Microsoft Office (Word) 2003 (11.6502.6408) SP1
Jonathan West - 03 Oct 2005 18:10 GMT
> 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

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Robertico - 04 Oct 2005 17:52 GMT
> 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
Jonathan West - 04 Oct 2005 18:23 GMT
>> 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
[quoted text clipped - 6 lines]
>
> 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.

Signature

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 

Robertico - 08 Oct 2005 12:32 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.