Word删除空白段落的宏代码
时间:2023-12-14 02:06:16
通过如下的宏代码,您就可以在WORD中删除空白的段落。
Sub DelBlank()
Dim i As Paragraph, n As Long
Application.ScreenUpdating = False ’关闭屏幕刷新
For Each i In ActiveDocument.Paragraphs ’在活动文档的段落集合中循环
If Len(i.Range) = 1 Then ’判断段落长段,此处可根据文档实际情况
i.Range.Delete ’进行必要的修改可将任意长度段落删除
n = n + 1 ’计数
End If
Next
MsgBox "共删除空白段落" & n & "个!"
Application.ScreenUpdating = True ’恢复屏幕刷新
End Sub
标签:Word删除空白段落的宏代码
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
PDF文档中的文字属性进行怎么设置?
2023-08-03 18:42:05
![](https://img.aspxhome.com/file/2023/1/15441_0s.jpg)
神奇大图打印软件如何打印大图片?
2023-05-17 08:26:59
![](https://img.aspxhome.com/file/2023/7/a330767_0s.jpg)
调整windows回收站大小避免误删文件的杯具
2023-03-15 06:25:22
![](https://img.aspxhome.com/file/2023/29/a257861_0s.jpg)
win7电脑桌面底部任务栏隐藏了怎么调出来
2023-11-03 20:12:26
![](https://img.aspxhome.com/file/2023/1/a280424_0s.jpg)
win7宽带连接711错误怎么办?windows7宽带错误711提示解决方法
2023-09-09 04:28:59
![](https://img.aspxhome.com/file/2023/29/a253208_0s.jpg)
2021笔记本天梯图 2021最新笔记本显卡天梯图高清版
2022-10-27 17:22:11
![](https://img.aspxhome.com/file/2023/6/a323094_0s.png)
EXCEL更改垂直轴的数据怎么改?
2023-09-21 07:40:18
![](https://img.aspxhome.com/file/2023/0/38080_0s.gif)
WPS 如何利用word批量制作邀请函
2023-09-11 11:46:23
![](https://img.aspxhome.com/file/2023/0/a186410_0s.jpg)
如何卸载Win10 2021.09.15推送的KB5005565最新补丁?
2022-03-17 23:10:36
![](https://img.aspxhome.com/file/2023/26/a219572_0s.jpg)
Word2003中进行设置页眉页脚的操作技巧
2023-11-14 02:15:09
在苹果Mac如何查看或取消订阅服务?
2023-06-10 16:57:36
![](https://img.aspxhome.com/file/2023/5/a208385_0s.png)
PPT 2019幻灯片中插入音频文件和调整的方法图解教程
2023-06-11 01:59:50
![](https://img.aspxhome.com/file/2023/10/a353121_0s.jpg)
搜狗拼音输入法中怎么样才能让输入法展示更多的候选词?
2023-02-01 15:30:31
![](https://img.aspxhome.com/file/2023/5/a317395_0s.png)
WPS excel 如何自动获取其他表格数据
2022-08-18 16:56:31
![](https://img.aspxhome.com/file/2023/7/a186967_0s.jpg)
电脑版WPS怎么设置三万〇五十格式
2022-09-01 23:57:47
![](https://img.aspxhome.com/file/2023/5/a183755_0s.jpg)
Word2007最小化功能区
2023-08-01 17:46:37
Win7打开WPS软件提示无法初始化visual basic环境怎么办
2023-02-15 23:45:16
![](https://img.aspxhome.com/file/2023/4/a306680_0s.jpg)
史上最全的Win10/Win7/Win8.1全部ISO系统镜像下载
2022-04-18 06:54:21
![](https://img.aspxhome.com/file/2023/28/a245596_0s.jpg)
Win10怎么自定义缩放屏幕比例?
2023-11-27 15:36:27
![](https://img.aspxhome.com/file/2023/26/a221211_0s.jpg)
公司如何使用Mac 钉钉创建新任务?给员工安排任务更快捷的方式
2022-01-16 02:11:30
![](https://img.aspxhome.com/file/2023/3/a214163_0s.png)