locked
How to complete auto-translation with progmming mode in word? Please debug the following code RRS feed

  • Question

  • I Write the following code to complete auto-translation. But it displays empty string, it can't not run. Please give me advice!

    Sub Translate()

         Dim objRes As Research
        Dim varTransRslt As Variant 'Translateed Result

        Set objRes = Research

        'Set the favorite service(English to Simplified Chines)
        objRes.FavoriteService = "2D4205BC-1D59-43B4-9156-19F8B8AEF1A4"
        objRes.SetLanguagePair wdEnglishUS, wdSimplifiedChinese
        varTransRslt = objRes.Query("2D4205BC-1D59-43B4-9156-19F8B8AEF1A4", "Most renewable energy comes either directly or indirectly from the sun. ", wdEnglishUS, True, True)

        MsgBox varTransRslt
    End Sub

    • Moved by Dave PatrickMVP Friday, October 26, 2018 4:08 AM not asking forums profile questions
    Friday, October 26, 2018 3:46 AM

Answers

All replies