?
Solved

How can i reset all images size to default in a word file

Posted on 2016-09-02
6
Medium Priority
?
91 Views
Last Modified: 2016-09-27
How can i reset all images size to default in a word file
I have many word files and all images and reduced from its original size. How can i reset them to the original size in one go?

thanks
0
Comment
Question by:mtthompsons
[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
  • 3
  • 2
6 Comments
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 41781586
Hi,

pls try
Sub macro()
For Each shp In ActiveDocument.InlineShapes
    If shp.Type = wdInlineShapePicture Then
        shp.LockAspectRatio = msoFalse
        sclH = shp.ScaleHeight
        SclW = shp.ScaleWidth
        shp.Height = shp.Height * 100 / sclH
        shp.Width = shp.Width * 100 / SclW
    End If
Next
End Sub

Open in new window

Regards
0
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 41781619
augmented code
Sub macro()
For Each shp In ActiveDocument.InlineShapes
    If shp.Type = wdInlineShapePicture Then
        shp.LockAspectRatio = msoFalse
        sclH = shp.ScaleHeight
        SclW = shp.ScaleWidth
        shp.Height = shp.Height * 100 / sclH
        shp.Width = shp.Width * 100 / SclW
    End If
Next
For Each shp In ActiveDocument.Shapes
    If shp.Type = msoPicture Then
        shp.LockAspectRatio = msoFalse
        shp.ScaleHeight 1, True
        shp.ScaleWidth 1, True
    End If
Next
End Sub

Open in new window

Regards
0
 
LVL 7

Expert Comment

by:Wayne Herbert
ID: 41781991
DO you want the images to still be contained in the Word files or are you looking for full size images only?
0
Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

 

Author Comment

by:mtthompsons
ID: 41782948
Thanks i get the attached error

Yes images have to be in the file just need to resize them inside the word file
0
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 41783625
then try

Sub macro()
For Each shp In ActiveDocument.InlineShapes
    If shp.Type = wdInlineShapePicture Then
        shp.LockAspectRatio = msoFalse
        shp.ScaleHeight = 100
        shp.ScaleWidth = 100
    End If
Next
For Each shp In ActiveDocument.Shapes
    If shp.Type = msoPicture Then
        shp.LockAspectRatio = msoFalse
        shp.ScaleHeight 1, True
        shp.ScaleWidth 1, True
    End If
Next
End Sub

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
The viewer will learn how to count occurrences of each item in an array.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

762 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