WORD中批量给图片增加边框

视图,宏,新建宏,在弹出宏编辑窗口中粘贴下面代码:


Sub 图片边框()


Dim oInlineShape As InlineShape


Application.ScreenUpdating = False


For Each oInlineShape In ActiveDocument.InlineShapes


With oInlineShape.Borders


.OutsideLineStyle = wdLineStyleSingle


.OutsideColorIndex = wdColorAutomatic


.OutsideLineWidth = wdLineWidth050pt


End With


Next


Application.ScreenUpdating = True


End Sub

保存,然后回到WORD编辑页面,点击宏,选择刚才新建的宏,然后运行就得了。 代码中 wdLineWidth050pt 中的 050pt 应该是指边框的磅数,需要调整边框大小更改这个数值就得了

打赏

2 thoughts on “WORD中批量给图片增加边框

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注