用宏批量调整word中图片版式、大小、方向.doc

用宏批量调整word中图片版式、大小、方向.doc

  1. 1、本文档共6页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Sub 图片对齐() 1 Sub 图片大小() 1 Sub 浮于文字上方() 3 Sub 浮于文字上方() 3 Sub 连续() 4 Sub 版式转换() 4 Sub 图片方向() 5 Sub 图片对齐() Application.ScreenUpdating = False 关闭屏幕更新 Dim n On Error Resume Next For n = 1 To ActiveDocument.Shapes.Count ActiveDocument.Shapes(n).Select Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeHorizontalPositionMargin Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionMargin Selection.ShapeRange.Left = wdShapeRight Selection.ShapeRange.Top = wdShapeBottom Selection.ShapeRange.LockAnchor = False Selection.ShapeRange.LayoutInCell = True Selection.ShapeRange.WrapFormat.AllowOverlap = False Selection.ShapeRange.WrapFormat.Side = wdWrapBoth Next Application.ScreenUpdating = True 恢复屏幕更新 End Sub Sub 图片大小() On Error Resume Next Dim mywidth Dim myheight Application.ScreenUpdating = False 关闭屏幕更新 mywidth = Val(InputBox(Prompt:=单位为厘米(cm);如果输入为0,则图片保持原始纵横比,宽度根据输入的高度数值自动调整;, Title:=请输入图片宽度, Default:=0)) * 28.35 myheight = Val(InputBox(Prompt:=单位为厘米(cm);如果输入为0,则图片保持原始纵横比,高度根据输入的宽度数值自动调整;, Title:=请输入图片高度, Default:=0)) * 28.35 ------------------------------------------------------------------ 调整嵌入式图形 Dim pic As InlineShape For Each pic In ActiveDocument.InlineShapes If mywidth = 0 Then pic.Height = myheight pic.ScaleWidth = pic.ScaleHeight ElseIf myheight = 0 Then pic.Width = mywidth pic.ScaleHeight = pic.ScaleWidth Else pic.Width = mywidth pic.Height = myheight End If Next 调整浮动式图形 Dim tu As Shape For Each tu In ActiveDocument.Shapes If mywidth = 0 Then tu.Height = myheight ElseIf myheight = 0 Then tu.Width = mywidth Else tu.LockAspectRatio = msoFalse tu.Width = mywidth tu.Height = myheight End If Next Application.ScreenUpdating = True 恢复屏幕更新 End Sub Sub 浮于文字上方() Dim oShape As Variant, tu As Shape, i Application.ScreenUpdating = False 关闭屏幕更新 On Error Resume Next 调整嵌入图形为浮于文字上方,并旋转90度 For Each oShape In ActiveDocument.InlineShapes Set oShape = oShape.ConvertToShape

文档评论(0)

dsdmlwz1v9 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档