请问怎么调用Word生成的词语拼音?
我想做一个软件,调用一些分词库中的常用汉语词语,放入Word中,生成汉语拼音,再读取这些拼音处理,不知道具体的技术上如何实现?在此请教一下大牛,肯望指教一二!多谢!
[解决办法]
到我的资源http://download.csdn.net/zhao4zhong1里面下载“GBK汉字拼音对照表”
[解决办法]
有位高手做了一个类函数植入了VBA,输入汉字可是显示拼音。据他介绍,他的函数时根据微软拼音输入法写的。以下是,他的代码。请参考(回复内容过长,分成2段)
Public Function HzToPy(Hz As String, Optional Sep As String = "", Optional ShowNotation As Boolean = True, Optional ShowInitialOnly As Boolean, Optional ShowOnlyOneChar As Boolean = True) As String Dim hp As HZ2PY Set hp = New HZ2PY '创建类 If Sep <> "" Then hp.Seperator = Sep hp.UseSeperator = True End If hp.InitialOnly = ShowInitialOnly hp.OnlyOneChar = ShowOnlyOneChar HzToPy = hp.GetPinYin(Hz) If Not ShowNotation Then HzToPy = hp.AdjustPhoneticNotation(HzToPy, pnNoNotation) Set hp = Nothing '释放类 End Function