在撰写报告、论文或制作文档时,经常需要插入多张图片。手动一张张调整不仅耗时,还容易导致格式不统一。本文将介绍几种在 Microsoft Word 中一键批量调整所有图片的方法,帮助你快速完成专业排版。
这是最高效的方式,适合处理大量图片:
Alt + F11 打开 VBA 编辑器。
Sub ResizeAllPictures()
Dim shp As Shape
Dim ilshp As InlineShape
For Each shp In ActiveDocument.Shapes
If shp.Type = msoPicture Then
shp.LockAspectRatio = msoTrue
shp.Width = CentimetersToPoints(10)
End If
Next shp
For Each ilshp In ActiveDocument.InlineShapes
If ilshp.Type = wdInlineShapePicture Then
ilshp.LockAspectRatio = msoTrue
ilshp.Width = CentimetersToPoints(10)
End If
Next ilshp
End Sub
Alt + F8,运行宏即可。虽然不能直接改尺寸,但可统一环绕方式或样式:
Ctrl + H 打开替换窗口。