启用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
12-10
596
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-14
785
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-14
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-22
1573
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-28
7036
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)