Word字数统计不包含表格的方法

很多大学对学生的论文作品有字数要求,并且字数统计不包含论文里的表格。 遗憾的是,Word软件本身的字数统计没有去除表格字数的功能,所以需要特别的方法搞定这个需求。 方法如下: [loginview] 原理:使用Word自带的Macro宏命令编辑器,添加一段可统计字数的代码,然后运行新添加的这个宏命令。 在最新版本的Word软件里,点击View,点击最右侧Macro,调出Macro宏管理界面,点击+,打开Macro编辑器,Normal – Insert – Module, 添加自定义宏命令,实现上述功能。 粘贴以下代码保存: 代码版本一(微软工程师MVP提供) Sub TableWordCount() Dim Tbl As Table, d As Long, t As Long With ActiveDocument For Each Tbl In .Tables With Tbl t = t + .Range.ComputeStatistics(wdStatisticWords) End With Next d = .Range.ComputeStatistics(wdStatisticWords) End With MsgBox “There are:” & vbCr & _ d … Read more