- 2
- 0
- 约2.38千字
- 约 2页
- 2020-10-08 发布于浙江
- 举报
批量设置word 里图片的大小及版式的技巧
1.批量设置固定大小
工具-宏-新建
Sub setpicsize() 设置图片大小
Dim n 图片个数
On Error Resume Next 忽略错误
For n = 1 To ActiveDocument.Shapes.Count Shapes类型图片
ActiveDocument.Shapes(n).Height = 70 设置图片高度为 70px
ActiveDocument.Shapes(n).Width = 80 设置图片宽度 80px
Next n
End Sub
运行即可
2.批量按比率缩小或放大
新建宏
Sub setpicsize() 设置图片大小
Dim n 图片个数
Dim picwidth
Dim picheight
On Error Resume Next 忽略错误
For n = 1 To ActiveDocument.Shapes.Count Shapes类型图片
picheight = ActiveDocument.Shapes(n).Height
picwidth = ActiveDocument.Shapes(n).Width
ActiveDocument.Shapes(n).Height = picheight * 0.5 设置高度为0.5倍
ActiveDocument.Shapes(n).Width = picwidth * 0.5 设置宽度为0.5倍
Next n
End Sub
3批量将图片转成嵌入型
新建宏
Sub 图片转嵌入型()
Dim apic As Shape
Application.ScreenUpdating = False
For Each apic In ActiveDocument.Shapes
apic.ConvertToInlineShape 转换为嵌入型
Next
Application.ScreenUpdating = True
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.ParagraphFormat
.LeftIndent = MillimetersToPoints(0)
.RightIndent = MillimetersToPoints(0)
.SpaceBefore = 6
.SpaceBeforeAuto = False
.SpaceAfter = 6
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphCenter
.WidowControl = False
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.NoLineNumber = False
.Hyphenation = True
.FirstLineIndent = MillimetersToPoints(0)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
.AutoAdjustRightIndent = True
.DisableLineHeightGrid = False
.FarEastLineBreakControl = True
.WordWrap = True
.HangingPunctuation = True
.HalfWidthPunctuationOnTopOfLine = False
.AddSpaceBetweenFarEastAndAlpha = True
.AddSpaceBetweenFarEa
您可能关注的文档
最近下载
- SYT 5069-2017 石油天然气工业 钻井和采油设备 管柱类落物打捞工具.docx VIP
- WF-007A多功能自动氩弧填丝机使用说明书7.pdf VIP
- SYT 5496-2017 石油天然气工业 钻井和采油设备 震击器及加速器.pdf VIP
- 2025年烟花爆竹经营企业(包括批发和零售企业)安全检查表.pdf VIP
- 2025至2030药用真菌行业调研及市场前景预测评估报告.docx VIP
- SYT 5382-2009 钻井液固相含量测定仪.docx VIP
- 《消毒供应质量控制指标(2024年版)》.docx VIP
- 股市主力操盘盘 口摩斯密码(原创内容,侵权必究).pptx
- 2012下半年深圳市机关公开招考公务员职位表.doc VIP
- 国际期刊科技论文写作与发表.PDF VIP
原创力文档

文档评论(0)