1、Alt+F11打开VBA编辑窗口,然后选择菜单项“插入-模块”;
2、在编辑区中粘贴如下代码:
Sub
ConvertAllNumbers()
Selection.Find.ClearFormatting
While
Selection.Find.Execute(FindText:="^#",
ReplaceWith:="^&",
MatchWildcards:=False,
Forward:=True,
Wrap:=Word.wdFindContinue)
Selection.MoveRight
wdWord,
1,
wdExtend
Selection.Fields.Add
Range:=Selection.Range,
Text:="="
&
Selection.Text
&
"
\*
CHINESENUM3"
Selection.MoveLeft
wdWord,
1,
wdExtend
Selection.Text
=
Selection.Fields(1).Result
Selection.Collapse
wdCollapseEnd
Wend
MsgBox
"完成!"
End
Sub
3、键入F5,运行看到“完成!”。
4、切换回Word文档窗口检查是否所有数字都已转换为中文数字。