Compressing graphics


B

Bart

Hi,

Word has a command that is shown when a graphic is selected. Select
Layout and the last command: Compress?? graphic. A dialog is displayed
in which I can select 'Compress all graphics' and 'Screen or printer
resolution'.

How can I perform this file size reduction macrowise? A recorded macro
looks like this:

Selection.InlineShapes(1).Fill.Visible = msoFalse
Selection.InlineShapes(1).Fill.Solid
Selection.InlineShapes(1).Fill.Transparency = 0#
Selection.InlineShapes(1).Line.Weight = 0.75
Selection.InlineShapes(1).Line.Transparency = 0#
Selection.InlineShapes(1).Line.Visible = msoFalse
Selection.InlineShapes(1).LockAspectRatio = msoTrue
Selection.InlineShapes(1).Height = 682#
Selection.InlineShapes(1).Width = 453.85
Selection.InlineShapes(1).PictureFormat.Brightness = 0.5
Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
Selection.InlineShapes(1).PictureFormat.ColorType =
msoPictureAutomatic
Selection.InlineShapes(1).PictureFormat.CropLeft = 0#
Selection.InlineShapes(1).PictureFormat.CropRight = 0#
Selection.InlineShapes(1).PictureFormat.CropTop = 0#
Selection.InlineShapes(1).PictureFormat.CropBottom = 0#

And I guess this is not what I need.

Thanks!
 
Ad

Advertisements

H

Helmut Weber

Hi Bart,

as nobody else has answered so far,
I think there is no straightforward way.

What else would then be left but "sendkeys"?

SendKeys "%a", 1
SendKeys "%w", 1
SendKeys "{ENTER}"
With ActiveDocument.CommandBars("Picture")
.Controls("Compress Pictures...").Execute
End With

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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