批量添加Word图片边框,1秒就可以完成
时间:2022-05-18 18:29:22
在Word中,如何批量添加给图片添加边框呢?本期Word小编与大家分享2个方法。
第一种:常规设置法
选中图片,点击格式——图片样式——边框,选择相应的粗细,对于之后的边框,可以借用F4键来实现。
PS:遇到图片数量不多的,可以用这种方法,若多则建议用第二种。
第二种:VBA法
点击开发工具——VBA——插入——模块,之后在输入以下代码:
Sub 图片边框()
Dim tupian As InlineShape
Application.ScreenUpdating = True
For Each tupian In ActiveDocument.InlineShapes
With tupian.Borders
.OutsideLineStyle = wdLineStyleSingle
.OutsideColorIndex = wdDarkBlue
.OutsideLineWidth = wdLineWidth150pt
End With
Next
Application.ScreenUpdating = False
End Sub
随后按F5或者点击选项卡中运行子过程即可运行。
代码说明如下图所示:
PS:
1、 Application.ScreenUpdating = True和 Application.ScreenUpdating = False是成对出现,表示如果屏幕更新已启用,显示的是True,否则是False,一般情况下,禁用屏幕更新可以加快宏代码的速度。若将Application.ScreenUpdating = False语句放在前面,完成之后将相应属性设置为True即可。
2、 如果选项卡中没有开发工具,可以在自定义功能选项中找到,如下图所示:
有关批量设置边框的技巧,本期就分享到这里
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
word2013如何使用文档导航窗格功能
![](https://img.aspxhome.com/file/2023/8/18498_0s.jpg)
Word文件在电脑里不出现文字,出现各种框框是什么原因?
word2007中如何给文字添加边框 word自定义文字边框的设置方法
word添加水印方法
windows10系统死机了怎么办?windows10系统死机解决教程
![](https://img.aspxhome.com/file/2023/0/48040_0s.jpg)
WPS里的文字怎么成了英文
wps怎么套用ppt模板
![](https://img.aspxhome.com/file/2023/3/53453_0s.jpg)
iOS 15 正式版将会有哪些功能?
![](https://img.aspxhome.com/file/2023/9/45669_0s.png)
Apple 2020 教育优惠开启,购买攻略来了!
![](https://img.aspxhome.com/file/2023/9/a194919_0s.jpg)
Win10系统开机一直卡在欢迎界面怎么办?
![](https://img.aspxhome.com/file/2023/7/49427_0s.jpg)
在Word2010文档中改变超链接颜色
![](https://img.aspxhome.com/file/2023/6/21746_0s.jpg)
金山WPS创建文本框链接的步骤
![](https://img.aspxhome.com/file/2023/9/a163989_0s.png)
Win10图片密码怎么设置?
![](https://img.aspxhome.com/file/2023/9/50849_0s.jpg)
在word中按空格键时后面的字被删除怎么解决
![](https://img.aspxhome.com/file/2023/6/20456_0s.jpg)
Win10提高电脑画质的一个小技巧
![](https://img.aspxhome.com/file/2023/8/50558_0s.png)
拉近大距离 WORD下划线
Win10专业版进入后频闪怎么办?Win10登录后闪屏解决方法
![](https://img.aspxhome.com/file/2023/3/50083_0s.jpg)
Win10 20H2显卡驱动老是报错怎么办?
![](https://img.aspxhome.com/file/2023/0/49240_0s.jpg)
Word2007中如何更正拼写时忽略ie和文件地址
![](https://img.aspxhome.com/file/2023/2/21912_0s.jpg)
台式电脑系统崩溃怎么办?台式电脑系统崩溃处理教程
![](https://img.aspxhome.com/file/2023/4/48004_0s.png)