Word图片怎么统一大小

在使用 Microsoft Word 编辑文档时,插入多张图片后常常会遇到尺寸不一的问题,影响整体排版美观。本文将介绍几种简单有效的方法,帮助您快速将 Word 中的图片统一调整为相同大小。

方法一:手动设置图片尺寸

方法二:使用格式刷快速复制样式

方法三:使用宏批量统一图片大小(推荐用于大量图片)

Alt + F11 打开 VBA 编辑器,插入以下代码:

Sub ResizeAllPictures()
    Dim shp As Shape
    Dim ilshp As InlineShape
    Dim heightCm As Single
    Dim widthCm As Single
    
    heightCm = InputBox("请输入统一高度(厘米):", , 7)
    widthCm = InputBox("请输入统一宽度(厘米):", , 10)
    
    For Each shp In ActiveDocument.Shapes
        If shp.Type = msoPicture Then
            shp.LockAspectRatio = msoFalse
            shp.Height = CentimetersToPoints(heightCm)
            shp.Width = CentimetersToPoints(widthCm)
        End If
    Next shp
    
    For Each ilshp In ActiveDocument.InlineShapes
        If ilshp.Type = wdInlineShapePicture Then
            ilshp.LockAspectRatio = msoFalse
            ilshp.Height = CentimetersToPoints(heightCm)
            ilshp.Width = CentimetersToPoints(widthCm)
        End If
    Next ilshp
End Sub
    

运行宏后,输入所需尺寸,即可一键统一所有图片大小。

小贴士