在日常办公或文档排版过程中,有时需要将Word文档中的多张图片统一旋转90度(例如从横向变为竖向)。本文将介绍几种简单有效的方法,帮助您快速完成这一操作。
适用于图片数量较少的情况:
适用于大量图片,可一键完成:
Alt + F11 打开VBA编辑器。
Sub RotateAllPictures90()
Dim shp As Shape
Dim ilshp As InlineShape
For Each shp In ActiveDocument.Shapes
If shp.Type = msoPicture Then
shp.Rotation = shp.Rotation + 90
End If
Next shp
For Each ilshp In ActiveDocument.InlineShapes
If ilshp.Type = wdInlineShapePicture Then
ilshp.ConvertToShape.Rotation = ilshp.ConvertToShape.Rotation + 90
End If
Next ilshp
End Sub
运行宏后,所有图片将顺时针旋转90度。
适合对图像质量要求高或需额外编辑的用户: