https://3g.163.com/dy/article/DF71NH650511PTTN.html
https://www.zhihu.com/question/23242989
WPS怎么创建宏 在WPS中录制宏的方法
https://jingyan.baidu.com/article/0a52e3f41c1d0abf63ed727b.html
工具链接:https://pan.baidu.com/s/1MUFx-4hGqm2I05r1FEbvOw
提取码:u5zd
图片进行大小设置,解除纵横锁定,居中
Sub FormatPics()
Dim iSha As InlineShape
For Each iSha In ActiveDocument.InlineShapes
If iSha.Type = wdInlineShapePicture Then
iSha.LockAspectRatio = msoFalse '不锁定纵横比
iSha.Width = CentimetersToPoints(14) '宽14CM
iSha.Height = CentimetersToPoints(8) '高8CM
End If
Next
Dim n ' 图片个数
On Error Resume Next ' 忽略错误
For n = 1 To ActiveDocument.InlineShapes.Count 'InlineShapes 类型图片
ActiveDocument.InlineShapes(n).Range.ParagraphFormat.Alignment = wdAlignParagraphCenter ’使得图片自动居中
Next n
End Sub