如何在Word文档中统一改图片大小(2007版)
1、如图,以此文档举例,如何通过word vba快速统一改图片大小。
使用<Alt+F11>,打开宏编辑工具。
2、在示例文档(根据文档名称),双击<This Document>,在弹出的界面右侧,输入如下宏代码:
Sub 遍历图片并处理()
Dim oDoc As Document
Set oDoc = Word.ActiveDocument
Dim oSP As Shape
Dim oInLineSp As InlineShape
With oDoc
For Each oInLineSp In .InlineShapes
oInLineSp.Width = CentimetersToPoints(14.5)
oInLineSp.Select
With Selection.ParagraphFormat
.Alignment = wdAlignParagraphCenter
.LineSpacingRule = wdLineSpaceSingle
End With
Next
End With
End Sub
3、按<F5>,执行该宏代码,执行结果如下图所示。
以上就是全部操作步骤,望采纳。
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:152
阅读量:118
阅读量:145
阅读量:148
阅读量:187