以下是引用northwolves在2007-8-3 13:46:37的发言:Sub macro1()
ActiveDocument.Content.Find.Execute "^w", , , , , , , , , " ", wdReplaceAll
ActiveDocument.Content.Find.Execute "([一-龥])[ ]([一-龥])", , , True, , , , , , "\1\2", wdReplaceAll
'ActiveDocument.Content.Find.Execute "([^1-^127])[ ]([^1-^127])", , , True, , , , , , "\1\2", wdReplaceAll
ActiveDocument.Content.Find.Execute "([一-龥])([^1-^127])", , , True, , , , , , "\1 \2", wdReplaceAll
ActiveDocument.Content.Find.Execute "([^1-^127])([一-龥])", , , True, , , , , , "\1 \2", wdReplaceAll
End Sub
这个程序,运行一次后会在数字与中文之间不判断直接添加空格,造成数字与中文之间原本正确的空有一格,变成空了两格。并且,它能自动在中文英文相遇顺序时加空却不能在英文中文相遇顺序时加空。