Word如何批量调整图片大小?
2、宏名起好了,单击“创建”进入Visual Basic 编辑器,输入如下代码并保存Subsetpicsize()'设置图片大小Dimn'图片个数On Error Resume Next'忽略错误Forn = 1ToActiveDocument.InlineShapes.Count 'InlineShapes类型图片ActiveDocument.InlineShapes(n).Height = 400'设置图片高度为400pxActiveDocument.InlineShapes(n).Width = 300'设置图片宽度300pxNextnForn = 1ToActiveDocument.Shapes.Count'Shapes类型图片ActiveDocument.Shapes(n).Height = 400'设置图片高度为400pxActiveDocument.Shapes(n).Width = 300'设置图片宽度300pxNextnEnd Sub3、返回word ,工具-宏-宏(或者直接按Alt+F8),再次进入宏的界面,选择刚才编辑好的宏,并单击“运行”按钮,就可以了!(图片多时,可能会花一些时间) 按比例缩放篇 具体操作同上,只是代码部分稍做修改,代码如下:Subsetpicsize()'设置图片大小Dimn'图片个数DimpicwidthDimpicheightOn Error Resume Next'忽略错误Forn = 1ToActiveDocument.InlineShapes.Count 'InlineShapes类型图片picheight = ActiveDocument.InlineShapes(n).Height picwidth = ActiveDocument.InlineShapes(n).Width ActiveDocument.InlineShapes(n).Height = picheight * 1.1'设置高度为 1.1倍ActiveDocument.InlineShapes(n).Width = picwidth * 1.1'设置宽度为 1.1倍NextnFor n = 1ToActiveDocument.Shapes.Count'Shapes类型图片picheight = ActiveDocument.Shapes(n).Height picwidth = ActiveDocument.Shapes(n).Width ActiveDocument.Shapes(n).Height = picheight * 1.1'设置高度为 1.1倍ActiveDocument.Shapes(n).Width = picwidth * 1.1'设置宽度为 ActiveDocument.InlineShapes(n).Range.ParagraphFormat.Alignment= wdAlignParagraphCenter‘左对齐:wdAlignParagraphLeft 注意:这里的Shapes(InlineShapes
Word如何批量调整图片的大小?这个视频告诉你!