![]() |
|
#9
|
||||
|
||||
|
That's as simple as:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
For i = 1 To .Shapes.Count
With .Shapes(i).PictureFormat
.CropTop = CentimetersToPoints(3)
.CropBottom = CentimetersToPoints(4)
.CropLeft = CentimetersToPoints(1)
.CropRight = CentimetersToPoints(2)
End With
Next
For i = 1 To .InlineShapes.Count
With .InlineShapes(i).PictureFormat
.CropTop = CentimetersToPoints(3)
.CropBottom = CentimetersToPoints(4)
.CropLeft = CentimetersToPoints(1)
.CropRight = CentimetersToPoints(2)
End With
Next
End With
Application.ScreenUpdating = True
End Sub
Note: Cropping is calculated relative to the original size of the picture, not relative to whatever it may have been re-scaled to. If you've re-scaled the picture, you'll need to divide the crop factor by the rescale percentage - which could be different for the horizontal and vertical axes.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| formatting, multiple, picture |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Word file with a lot of pictures. Picture size small, File size HUGE | Blackcloud_9 | Drawing and Graphics | 1 | 04-10-2018 06:04 AM |
Make a macro apply only on selected pictures
|
Mattia | Word VBA | 2 | 11-10-2017 12:52 AM |
Macro to apply artistic effect to selected picture in Microsoft Word 2010.
|
staicumihai | Word VBA | 2 | 11-24-2016 01:41 AM |
| VBA Word Table - Select More than 1 Column at a time - Apply Formatting | jc491 | Word VBA | 12 | 09-24-2015 06:03 AM |
| how do i apply any change to all pictures in one document | greenil | Word | 0 | 06-18-2013 12:56 AM |