Bulk Modify picture size in Word

Source: Internet
Author: User

Small one recently in review high number, review material of course is downloaded electronic version of, Hey! But ~ ~ this material incredibly ~ ~ All complex formulas are picture form, light so small one also endure, the key high number well ~ ~ The equation will be more complex, these pictures do so small, can not see clearly! CTRL + wheel can be enlarged, but this is not very convenient, and ~ ~ Small one also want to print out, how to do? Always can't a picture of a picture of the modification bar ...

Statement: Small face to say " batch modification word picture size " method needs to use to the macro, so ~ ~ Better understanding of VB! Of course ~ ~ This is not necessary, as long as follow the 小一 of the picture and text tutorial go, do not know what is a macro, do not know what is VB can also!

Word bulk Modify picture size--Fixed long width piece

This part is about modifying all the pictures in Word to be fixed and the same length and width!
1, open Word, tools-macros-macros (or directly press ALT+F8) into the macro interface, as shown below, enter a macro name, the macro name of their own, can remember on the line!

2, macro name up, click "Create" into the Visual Basic Editor, enter the following code and save
Sub setpicsize () ' Set picture size
Dim n ' number of pictures
On Error Resume Next ' Ignore error
for n = 1 to ActiveDocument.InlineShapes.Count ' inlineshapes type picture
activedocument.inlineshapes (n). Height = = ' Set picture altitude to 400px
activedocument.inlineshapes (n). width = + ' Set picture widths 300px
Next N
For n = 1 to ActiveDocument.Shapes.Count ' Shapes type picture
ActiveDocument.Shapes (n). Height = = ' Set picture altitude to 400px
activedocument.shapes (n). width = + ' Set picture widths 300px
Next N
End Sub

3, return Word, tools-macros-macros (or directly press Alt+f8), again into the macro interface, select just edit the good macro, and click the "Run" button, you can! (Pictures may take some time)

Word Bulk Modify picture size--scale the article proportionally

This section is about scaling all the pictures in Word proportionally!
The actual operation of the same, but the code part of the slightly modified, the code is as follows:
Sub setpicsize () ' Set picture size
Dim n ' picture Count
Dim picwidth
Dim picheight
On Error Resume Next ' ignore error ' ' /span>
for n = 1 to ActiveDocument.InlineShapes.Count ' InlineShapes type picture
Picheight = Activedocument.inlineshapes (n). Height
Picwidth = Activedocument.inlineshapes (n). Width
Activedocument.inlineshapes (n). Height = picheight * 1.1 set height to 1.1 times times
activedocument.inlineshapes (n). width = picwidth * 1.1 set width to 1.1 times times
Next n
for n = 1 to activedocument.shapes . Count ' Shapes type picture
Picheight = ActiveDocument.Shapes (n). Height
Picwidth = ActiveDocument.Shapes (n). Width
Activedocument.shaPES (n). Height = picheight * 1.1 set height to 1.1 times times
ActiveDocument.Shapes (n). width = picwidth * 1.1 "set width to 1.1 times times
Next n
end Sub

Although 小一 's code is not good code, but it can solve the problem of small one, instantly put all the pictures in Word document magnified 1.1 times times, various formulas, axes are much clearer than the original,

To automatically batch the pictures in Word, the main task is to reset all the pictures and crop all the pictures. The code is simple, but worth recording, can be referenced later.

For each ishape in activedocument.inlineshapes ' 1cm = 28.35 pt Dim pic If ishape.type = wdinlineshapepicture Then ESET IShape.PictureFormat.CropTop = 1.5 * 28.345 iShape.PictureFormat.CropBottom = 1.5 * 28.345 IShape.PictureFormat.Crop Left = 1.2 * 28.345 iShape.PictureFormat.CropRight = 1.2 * 28.345-If Next IShape End Sub

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.