This is something I wrote awhile ago. It's not exactly what you want, but it will get you started. It's from english to japanese but only for a word you type in. You'll have to examine the html page of the translation page of google to find the value off japanese to english. Probably ja|en .
Sub Translate_google()
Dim ie As Object
Dim WebPage As String
Dim wb As Workbook
Dim ws As Worksheet
Dim vWord As String
Dim current As Workbook
Dim rng As Range
Dim lrow As Long
Application.ScreenUpdating = False
Set current = ActiveWorkbook
lrow = current.Sheets(1).Range("A" & Rows.Count).End(xlUp).Row
vWord = Application.InputBox("Give a word to translate to Chinese", _
"Translate to Chinese")
Set ie = CreateObject("InternetExplorer.Application")
'WebPage = "http://translate.google.com/translate_t?" & _
"langpair=en|zh-CN&ie=UTF8&text=" & vWord
WebPage = "http://translate.google.com/translate_t?" & _
"langpair=en|ja&ie=UTF8&text=" & vWord
ie.Visible = False
ie.Navigate WebPage
'Loop until IE pages is fully loaded
Do Until ie.ReadyState = 4 'READYSTATE_COMPLETE
Loop
ie.ExecWB 17, 0
'Copy to the clipboard
Application.Wait (Now + TimeValue("0:00:1"))
ie.ExecWB 12, 0
Application.Wait (Now + TimeValue("0:00:1"))
'Close Internet Explorer
'ie.Visible = False
ie.Quit
Set ie = Nothing
Application.Wait (Now + TimeValue("0:00:1"))
'Create new workbook where we are going to paste the clipboard
Set wb = Workbooks.Add
Set ws = wb.Worksheets.Add
Application.Wait (Now + TimeValue("0:00:3"))
ws.Paste
Application.Wait (Now + TimeValue("0:00:3"))
Set rng = ActiveWorkbook.Sheets(1).Range("D11")
rng.Copy
current.Worksheets(1).Range("A" & lrow + 1).Value = vWord
current.Worksheets(1).Range("B" & lrow + 1).PasteSpecial
Application.DisplayAlerts = False
wb.Close
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Range("A1").Select
End Sub
Charlize
Bookmarks