启用VB编辑器
点击右侧Thisdocument
输入以下代码后,运行
Sub setpicsize()
Dim i
Dim Height, Weight
Height = 500
Weight = 200
On Error Resume Next
For i = 1 To ActiveDocument.InlineShapes.Count 'InlineShapes类型图片
ActiveDocument.InlineShapes(i).Height = 250 '设置图片高度为Height_px
ActiveDocument.InlineShapes(i).Width = 420 '设置图片宽度Weight_px
Next i
For i = 1 To ActiveDocument.Shapes.Count 'Shapes类型图片
ActiveDocument.Shapes(i).Height = Height '设置图片高度为 Height_px
ActiveDocument.Shapes(i).Width = Weight '设置图片宽度 Weight_px
Next i
End Sub
wps批量调整图片大小
最新推荐文章于 2025-04-16 09:52:49 发布