Solved

How to scale all images in a Word document

Posted on 2009-03-29
2
1,244 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

When creating Microsoft Word-based forms there may be a need to have a form field repeated throughout the whole document. For instance, with a company name, you may want this information repeated automatically throughout the document rather than man…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
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.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

756 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