Code for compress pictures?

V

Vivian

In Word 2003 I tried to record Format > Picture > Picture tab > Compress
button. The macro records everything except the information in the Compress
Pictures dialog box. I went to the VB Editor to find the name of the dialog
box so that I could use "With Dialogs(wdDialogXXX)" but there is no
CompressPictures dialog box in the collection.

I need to create one macro that accepts all of the defaults in this dialog
box and one macro that changes "Selected pictures" to "All pictures in
document". How do I do this?

Thank you, Vivian
 
G

George Lee

For the sake of completeness, this was posted at
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=685148&SiteID=1 on 31
Aug 2006 by MVP Cindy Meister:

There's just some functionality that's not exposed in the Word object model,
especially a few things that have to do with the shared, Office graphics
stuff. Picture compression is one of these things. The best you can do is to
display the dialog box - by triggering the built-in command:

Make sure a valid picture is selected, then
app.CommandBars.FindControl(Id:=6382).Execute

You can try putting a Sendkeys in front of the above line, with an {Enter}
at the end of the keystrokes to confirm the dialog box. But that's the best
you can do.
 

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