Advertisement
Guest User

ResizePic

a guest
Jul 8th, 2010
10,428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ' Resizes selected pictures to 6" wide
  3. On Error Resume Next
  4. Dim oShp As Shape
  5. Dim iShp As InlineShape
  6. Dim ShpScale As Double
  7. With Selection
  8.   For Each iShp In .InlineShapes
  9.     With iShp
  10.       If .Type = wdInlineShapePicture Or wdInlineShapeLinkedPicture Then
  11.         ShpScale = InchesToPoints(6) / .Width
  12.         .Width = .Width * ShpScale
  13.         .Height = .Height * ShpScale
  14.       End If
  15.     End With
  16.   Next iShp
  17. End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement