Solved

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

Posted on 2016-09-02
6
82 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 51

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 51

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 6

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
Independent Software Vendors: 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!

 

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
 

Author Comment

by:mtthompsons
ID: 41782949
0
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 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

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

734 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