- word做表格教程:Word中繁体艺术字的两种制作方法
- word文档基本操作教程:无需词典 Word2010也能屏幕取词翻译
- word做表格教程基本操作:Word调整段落的方法
- word制作简历教程:Word字体怎么格式化?
遇到一个文档是用艺术字打的水印,本来想看怎么能够批量选中艺术字对象,再统一删除,无奈并没找到对应的方法,最后成功通过宏语言,wordpress教程,使用VBA代码实现删除艺术字的目的。
方法
首先选择并创建宏对象:
之后在代码框里粘贴删除艺术字的函数内容:
完整代码如下,需要注意的是:此代码适用于Word2016版,pdf怎么转换成word,如果是2019版,要把判断艺术字的表达式改一下,即Type赋值语句改为:sh.Type=msoTextBox,至于其他版本的word可以分别试试这两个语句。
Sub 删除艺术字()
Dim sh As Shape
For Each sh In ActiveDocument.Shapes
If sh.Type = msoTextEffect Then
sh.Delete
End If
Next
End Sub
最后运行代码,如果包含艺术字的页数比较多的话,可能要多运行几次,WORD上下页,才能完全删除所有内容:
本地下载
上一篇:word学习教程:word 文章如何连续引用格式 下一篇:word教程视频全集自学:word2019中如何设置单元格内文字的对齐方式和方向
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。