在撰写报告、论文或制作宣传材料时,经常需要在Word文档中插入多张图片。但不同来源的图片尺寸不一,会导致排版混乱、影响整体美观。本文将介绍几种实用方法,帮助你快速统一调整Word中所有图片的尺寸。
如果你的文档包含数十张甚至上百张图片,手动操作效率低下。此时可使用Word内置的VBA宏功能:
Alt + F11 打开VBA编辑器。
Sub ResizeAllPictures()
Dim pic As InlineShape
Dim targetWidth As Single
Dim targetHeight As Single
' 设置目标尺寸(单位:磅,1厘米 ≈ 28.35磅)
targetWidth = 283.5 ' 10厘米
targetHeight = 198.45 ' 7厘米
For Each pic In ActiveDocument.InlineShapes
If pic.Type = wdInlineShapePicture Then
pic.LockAspectRatio = msoFalse
pic.Width = targetWidth
pic.Height = targetHeight
End If
Next pic
End Sub
Alt + F8,选择 ResizeAllPictures 并运行。⚠️ 注意:运行前建议备份文档,并确保图片为“嵌入型”(Inline Shape)。
虽然Word无法直接设置“全局图片尺寸”,但你可以:
Shapes 对象。