Saturday, May 22, 2010

How to Increase / Decrease Size of Images in Word Document using VBA

Scaling of Pictures / Images using Word VBA

The following code scales all the pictures of the Word document

Function Scale_Pictures(ByRef oTempWd As Document) As Boolean


Dim oShp As Word.Shape                      ' Word Shape Object


' -------------------------------------
' Scale Shapes Height and Weight
' -------------------------------------
For Each oShp In oTempWd.Shapes
    oShp.ScaleHeight 0.6, msoFalse
    oShp.ScaleWidth 0.6, msoFalse
Next oShp

End Function 

No comments:

Post a Comment

StumbleUpon
Share on Facebook
Related Posts Plugin for WordPress, Blogger...
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.