将所有非拉丁字符替换为对应的拉丁 az 字符以及 VBA 中的字数统计
我正在尝试用 VBA 编写一个脚本 将:
替换所有 É 和其他类似的 带有拉丁语的字符 对应部分。
删除所有非字母数字
字符。删除重复的空格
然后对字符串进行字数统计
我已经计算出我可以在“”上拆分字符串并对元素进行计数以获得字数……但我正在努力解决其余的问题。非常感谢帮助。
I am trying to write a script in VBA that
will:
replace all É and other similar
characters with their latin
counterparts.Remove all non alpha numeric
characters.Remove duplicate spacing
then word count the string
I have worked out that i can split the string on " " and count the elements to get the word count... but I am struggling on the rest of it. Help much appreciated.
Word 内置了句子、段落和整个文档的字数统计:
至于替换,最简单的方法可能是录制一个宏来查看其工作原理。您必须将重音字符一一替换,或者使用 RegEx 将所有 A 类型(Å, Ä, Â ,Á, À)字符替换为 A,并且很快。
Word has a word count built in for sentences, paragraphs and the entire document:
As for replace, it is probably easiest to record a macro to see how this works. You will have to replace the accented characters one by one, or use RegEx to replace all A type (Å, Ä, Â ,Á, À) characters with A, and so on.