首页 > Office专区 > Office教程 >

Office2019如何批量删除艺术字

Office教程 2022-04-19 21:48:49

如果你确认了是艺术字且不是嵌入型的,可以按Alt+F11,打开VBA编辑窗口,放入下面这段代码:

 

Sub 删除艺术字()
Dim sh As Shape
For Each sh In ActiveDocument.Shapes
If sh.Type = msoTextEffect Then
sh.Delete
End If
Next
End Sub

 

如果没用试试下面这个

 

Sub 删除艺术字()
Dim sh As Shape
For Each sh In ActiveDocument.Shapes
If sh.Type = msoTextBox Then
sh.Delete
End If
Next
End Sub

需要将文档另存为为带有宏的格式文档,然后执行

 


标签: Office批量删除艺术字

office教程网 Copyright © 2016-2020 http://www.office9.cn. Some Rights Reserved. 苏ICP备20040415号-9