Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I routinely paste many screen captures into Microsoft Word 2007 and then have to manually resize them to around 75%, which becomes very tedious.

The screen captures are all different sizes.

I've tried creating a macro for this, but I'm only able to write a macro that will resize a selected image to specific dimensions. And I can't get the macro recorder to recognize either manually resizing in the document window or using the Size dialog.

Is it possible to write a macro that will resize a selected image to 75% of its current size?

This question is similar to mine, but the user's requirement is to resize all of his images to the same size. I need to resize images that have an arbitrary height/width.

I'm also open to a technique that will paste images at a smaller size to begin with.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Copy this code to a module in VBA Editor (Alt + F11) for your document. If there isn't a module already, you can select to add one from the insert menu.

    Sub PicResize()
     Dim PecentSize As Integer

     PercentSize = 75

     If Selection.InlineShapes.Count > 0 Then
         Selection.InlineShapes(1).ScaleHeight = PercentSize
         Selection.InlineShapes(1).ScaleWidth = PercentSize
     Else
         Selection.ShapeRange.ScaleHeight Factor:=(PercentSize / 100), _
           RelativeToOriginalSize:=msoCTrue
         Selection.ShapeRange.ScaleWidth Factor:=(PercentSize / 100), _
           RelativeToOriginalSize:=msoCTrue
     End If
 End Sub

To run a this macro press Alt + F8, select PicResize from the list of macros and click RUN. You can also assign it to a button in a menu, if you want to just click each time to run the macro.

share|improve this answer
    
Thanks CharlieRB - I appreciate the clear instructions. I almost have it working, but after executing the macro, Word becomes unstable -- I can no longer access anything from the Ribbon or close the program. Can you think of why this might be occurring? (I checked to make sure Windows XP / Office 2007 are fully updated.) Thanks! –  cantera25 Dec 21 '11 at 19:27
1  
Not sure why that would happen. I had no problem running it multiple times on several images before I posted it for you. The code should be just fine for Office 2007. Might want to reboot and try again. –  CharlieRB Dec 21 '11 at 20:06
    
Still having issues, but it's definitely something on my end. Accepted your answer - thanks again! This had been a problem for me for quite a while. –  cantera25 Dec 21 '11 at 20:48
    
You're welcome. Glad to help. –  CharlieRB Dec 21 '11 at 21:00
    
This macro just saved me hours of click-clicking. –  Pierre Arnaud Feb 20 '14 at 5:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.