word2013怎样批量重设图片和大小?(转)
https://www.zhihu.com/question/52908434/answer/132934213
点击视图,宏,查看宏,任意输入一个宏名,创建,
清空框内内容,复制以下代码粘贴,保存。
Sub 批量图片大小()
Dim iSha As InlineShape
For Each iSha In ActiveDocument.InlineShapes
If iSha.Type = wdInlineShapePicture Then
iSha.LockAspectRatio = msoFalse '不锁定纵横比
iSha.Width = CentimetersToPoints(21) '宽21CM
iSha.Height = CentimetersToPoints(29.7) '高29.7CM
End If
Next
End Sub
Sub 批量图片大小()
Dim iSha As InlineShape
For Each iSha In ActiveDocument.InlineShapes
If iSha.Type = wdInlineShapePicture Then
iSha.LockAspectRatio = msoFalse '不锁定纵横比
iSha.Width = CentimetersToPoints(21) '宽21CM
iSha.Height = CentimetersToPoints(29.7) '高29.7CM
End If
Next
End Sub
保存,回到word界面,点击宏,查看宏,运行。
完美~