1、Alt+F8调出vb宏 创建一个宏名字,setsize
粘贴代码后保存关闭。
Sub setsize() \' \' setsize 宏 \' \' Dim iSha As InlineShape For Each iSha In ActiveDocument.InlineShapes If iSha.Type = wdInlineShapePicture Then iSha.LockAspectRatio = msoFalse \'不锁定纵横比 iSha.Width = CentimetersToPoints(7.13) \'宽7.13CM iSha.Height = CentimetersToPoints(9.22) \'高9.22CM End If Next End Sub
2.Alt+F8 选择刚才新建的宏点击运行即可。
3.实例如下