I'm new to VBA and I want to translate word document text into another language (English to Telugu) I have hundreds of documents.
I want to automate this process using the macro.
This should work for one document later I can automate but as if know
I don't know how to translate one document and replace translated text, save and close.
Any help is appreciated
please see my code
Sub Translate_text()
Dim IE As Object 'for browser
ActiveDocument.Select 'select text from open document
Selection.Copy 'copy selected text
Set IE = CreateObject("InternetExplorer.Application") 'Create object for IE
With IE
.Visible = True
.Navigate "https://translate.google.com/#view=home&op=translate&sl=auto&tl=te" 'open the following Url
'--------------------------
Selection.Paste 'paste copied text in translator focused text area
'facing problem don't know the proper code
'Copy text from another text area
'don't know the code for it
'--------------------------
.Quit
End With
'-----------------------------
ActiveDocument.Replace 'replace in the active document
.Save
.Close
'-----------------------------
End Sub