VBA translation function
-
יום שני 14 מאי 2012 06:26
I want to create a simple vba function (in MS Project...) to translate on demand. I have a simple one I found on the web, but it returns question marks instead of the Chinese translation. I assume this is a "code page" issue or something like that. Can anyone help?
Sub bingTranslate() languageFrom = "en": languageTo = "zh-chs": sText = "Thank you" ID = "708BEDCB01828123DC7B6C6A6AB12EF82DFBB611" sURL = "http://api.microsofttranslator.com/V2/Ajax.svc/Translate?oncomplete=&appId=" & ID + "&from=" & languageFrom + "&to=" & languageTo & "&text=" & sText Set oH = CreateObject("Microsoft.XMLHTTP") oH.Open "get", sURL, False oH.sEnd sresult = oH.responseText MsgBox oH.responseText Debug.Print sresult End Sub
Thanks in advance.Jim
כל התגובות
-
יום שלישי 15 מאי 2012 14:28
The Bing AppID methodology has been deprecated. You'll have to use the Windows Azure Marketplace tokens to access translator.
I have a VB (not VBA) sample here:http://social.msdn.microsoft.com/Forums/en-US/microsofttranslator/thread/3f9a270e-3360-4aa1-9eb8-669145298d45
Hope that helps! :)
//Laurence Moroney: www.netnavi.tv // Author of 'Introducing Silverlight' series and much more // @lmoroney
- הוצע כתשובה על-ידי Laurence MoroneyMicrosoft Employee יום רביעי 16 מאי 2012 02:34
-
יום שלישי 15 מאי 2012 15:29
The Bing AppID methodology has been deprecated. You'll have to use the Windows Azure Marketplace tokens to access translator.
I have a VB (not VBA) sample here:http://social.msdn.microsoft.com/Forums/en-US/microsofttranslator/thread/3f9a270e-3360-4aa1-9eb8-669145298d45
Hope that helps! :)
//Laurence Moroney: www.netnavi.tv // Author of 'Introducing Silverlight' series and much more // @lmoroney