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条评论

  • 小憨 2019年6月16日 回复

    朋友您好,申请友链:
    站名:WordPress加速
    域名:www.zaoblog.com

    贵站链接已加,请审核!

    • 阿柯 2019年6月19日 回复 作者

      不好意思,贵站内容和我的不同类型,请把我的链接撤了,谢谢

发表回复

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