word如何给多张图片批量添加边框

时间:2026-02-14 00:38:42

1、双击打开需要编辑的word文档

word如何给多张图片批量添加边框

2、点击【视图】-【宏】

word如何给多张图片批量添加边框

3、然后选择”查看宏“命令,打开”宏“对话框,

word如何给多张图片批量添加边框

4、宏名:输入”picture“,再点击”创建“按钮

word如何给多张图片批量添加边框

5、打开”宏代码“对话框,粘贴如下代码:

Sub Example()

    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如何给多张图片批量添加边框

6、然后保存宏,并执行宏命令,

word如何给多张图片批量添加边框

7、回到文档发现文档中的所有图片都添加了边框,如下图所示

word如何给多张图片批量添加边框

© 2026 智德知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com