欢迎来到天天文库
浏览记录
ID:57420354
大小:16.50 KB
页数:2页
时间:2020-08-16
《批量设置WORD-里图片的大小及版式的技巧.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、批量设置word里图片的大小及版式的技巧1.批量设置固定大小工具-宏-新建Subsetpicsize()'设置图片大小Dimn'图片个数OnErrorResumeNext'忽略错误Forn=1ToActiveDocument.Shapes.Count'Shapes类型图片ActiveDocument.Shapes(n).Height=70'设置图片高度为70pxActiveDocument.Shapes(n).Width=80'设置图片宽度80pxNextnEndSub运行即可2.批量按比率缩小或放大新建宏Subsetpicsize
2、()'设置图片大小Dimn'图片个数DimpicwidthDimpicheightOnErrorResumeNext'忽略错误Forn=1ToActiveDocument.Shapes.Count'Shapes类型图片picheight=ActiveDocument.Shapes(n).Heightpicwidth=ActiveDocument.Shapes(n).WidthActiveDocument.Shapes(n).Height=picheight*0.5'设置高度为0.5倍ActiveDocument.Shapes(n).
3、Width=picwidth*0.5'设置宽度为0.5倍NextnEndSub3批量将图片转成嵌入型新建宏Sub图片转嵌入型()DimapicAsShapeApplication.ScreenUpdating=FalseForEachapicInActiveDocument.Shapesapic.ConvertToInlineShape'转换为嵌入型NextApplication.ScreenUpdating=TrueSelection.MoveRightUnit:=wdCharacter,Count:=1,Extend:=wdEx
4、tendWithSelection.ParagraphFormat.LeftIndent=MillimetersToPoints(0).RightIndent=MillimetersToPoints(0).SpaceBefore=6.SpaceBeforeAuto=False.SpaceAfter=6.SpaceAfterAuto=False.LineSpacingRule=wdLineSpaceSingle.Alignment=wdAlignParagraphCenter.WidowControl=False.KeepWithNe
5、xt=False.KeepTogether=False.PageBreakBefore=False.NoLineNumber=False.Hyphenation=True.FirstLineIndent=MillimetersToPoints(0).OutlineLevel=wdOutlineLevelBodyText.CharacterUnitLeftIndent=0.CharacterUnitRightIndent=0.CharacterUnitFirstLineIndent=0.LineUnitBefore=0.LineUni
6、tAfter=0.AutoAdjustRightIndent=True.DisableLineHeightGrid=False.FarEastLineBreakControl=True.WordWrap=True.HangingPunctuation=True.HalfWidthPunctuationOnTopOfLine=False.AddSpaceBetweenFarEastAndAlpha=True.AddSpaceBetweenFarEastAndDigit=True.BaseLineAlignment=wdBaseline
7、AlignAutoEndWithEndSub4.批量将图片转四周型新建宏Sub图片版式转换四周型()DimapicAsVariant,shapeTypeAsWdWrapTypeOnErrorResumeNextForEachapicInActiveDocument.InlineShapesapic.ConvertToShapeWithoShapeoShape.WrapFormat.Type=0'四周型oShape.WrapFormat.AllowOverlap=False'不允许重叠EndWithNextEndSub
此文档下载收益归作者所有