Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

ResizePic

By: a guest on Jul 8th, 2010  |  syntax: VisualBasic  |  size: 0.43 KB  |  views: 3,281  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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