word 宏批量修改图片的大小

word 宏批量修改图片的大小

 

Sub 批量图片大小()
Dim iSha As InlineShape
For Each iSha In ActiveDocument.InlineShapes
If iSha.Type = wdInlineShapePicture Then
'iSha.LockAspectRatio = msoFalse '不锁定纵横比
iSha.LockAspectRatio = msoTrue '锁定纵横比
iSha.Width = CentimetersToPoints(30) '宽CM
'iSha.Height = CentimetersToPoints(21) '高CM
End If
Next
End Sub

 

posted @ 2020-04-05 09:47  千家诗  阅读(674)  评论(0编辑  收藏  举报