Question : Resize pictures in Word

Hi,

Somebody gave me a Word document with loads of pictures in. The document is 30 MB but the pictures are not that big.
Is there a way to resize the pictures automatically but not change the document itself in order to decrease the document size?

Regards,
E.

Answer : Resize pictures in Word

Hi exchangeexpertsdelijn:

you need a bit of VBA here
Please find the below macro which can be deal with your situation

Sub AllPictSize()
       Dim PecentSize As Integer
       Dim oIshp As InlineShape
       Dim oshp As Shape
   
       PercentSize = InputBox("Enter percent of full size", "Resize Picture", 75)
   
       For Each oIshp In ActiveDocument.InlineShapes
           With oIshp
               .ScaleHeight = PercentSize
               .ScaleWidth = PercentSize
           End With
       Next oIshp
   
       For Each oshp In ActiveDocument.Shapes
           With oshp
               .ScaleHeight Factor:=(PercentSize / 100), _
                 RelativeToOriginalSize:=msoCTrue
               .ScaleWidth Factor:=(PercentSize / 100), _
                 RelativeToOriginalSize:=msoCTrue
           End With
       Next oshp
   End Sub

Extracted from allexperts.com

I have tested this and it's working fine with word 2007.

Things to remember.

sometimes your word doc may be contained the pictures which has already re sized form the original picture. when you resizing the picture from this macro keep in mind. If you selected the image resize ratio as 50% and you see some images are not actually re sized to half, then probably the original image is already re sized after it is embeded to the word doc.

Another point, re sizing the images will be effecting to disorder your document alignments.


Some thing to clarify

you said:

Is there a way to resize the pictures automatically but not change the document itself in order to decrease the document size?


Do you mean re-sizing should not decrease the document size?



Random Solutions  
 
programming4us programming4us