在Excel中,沒(méi)有簡(jiǎn)體和繁體文字之間的轉(zhuǎn)換功能。
但是Word卻有此功能,因此,我們可以在Excel中通過(guò)VBA代碼調(diào)用Word的繁體和簡(jiǎn)體功能,實(shí)現(xiàn)在Excel中的簡(jiǎn)體繁體轉(zhuǎn)換的功能。
下面就是與此相關(guān)的VBA代碼,希望對(duì)你有幫助。
Sub JFZH()
Dim wd As Word.application
Set wd = New Word.Application
With wd.Documents.Add .Sections(1).Range.Text = Sheet1.Cells(1, 1).Text ' .Sections(1).Range.Select 'wd.WordBasic.ToolsSCTCTranslate Direction:=0, Varients:=0, TranslateCommon:=0
wd.WordBasic.ToolsTCSCTranslate Direction:=0, Varients:=0, TranslateCommon:=0 '繁體轉(zhuǎn)簡(jiǎn)體
Sheet1.Cells(1, 1) = .Sections(1).Range.Text .Close False '簡(jiǎn)體轉(zhuǎn)繁體
End With wd.Quit
Set wd = Nothing End Sub
新聞熱點(diǎn)
疑難解答
圖片精選