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.

Compressing graphics

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bart - 21 Oct 2005 20:05 GMT
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!
Helmut Weber - 23 Oct 2005 12:24 GMT
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

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

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


Rate this thread:






 
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.