Solved

How to scale all images in a Word document

Posted on 2009-03-29
2
1,248 Views
Last Modified: 2012-05-06
I need a macro that will scale all images in a document to 100% height x 100% width.  Not sure how to do this.
0
Comment
Question by:swexler100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
RapidDelp earned 125 total points
ID: 24016936
For word 2003, as long as the image can be scaled, this will do it.
Sub macro2()
    Dim s As InlineShape
    Dim d As Document
    
    Set d = Application.ActiveDocument
    
    For Each s In d.InlineShapes
        Select Case s.Type
            Case wdInlineShapeLinkedPicture, _
                wdInlineShapePicture
                s.ScaleHeight = 100
                s.ScaleWidth = 100
            Case Else
                ' s.Type
        End Select
    Next
    
End Sub

Open in new window

0
 

Author Closing Comment

by:swexler100
ID: 31564156
Terrific.  This works great.  Thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question