how to get URL below from Google TTS speech after click Liston Button from inspect Element >> F11 window >> then Network?
can I filter what I need as Medea then copy it through VBA ?
I have problem with ( "Ctrl+4 " SendKeys String:="^4") Some time works and some not, also Keyboard " Num Lock" deactivate how to reactivate
"https://translate.google.com.sa/tra...n=3&tk=656820.834353&client=webapp&prev=input"
can I filter what I need as Medea then copy it through VBA ?
I have problem with ( "Ctrl+4 " SendKeys String:="^4") Some time works and some not, also Keyboard " Num Lock" deactivate how to reactivate
"https://translate.google.com.sa/tra...n=3&tk=656820.834353&client=webapp&prev=input"
VBA Code:
Public Sub Google_TTS()
''''''''''''''
ClosingIE ' Close open IE
'''''''''''''''
Dim IE As InternetExplorer
Set IE = Nothing
Set IE = CreateObject("InternetExplorer.application")
IELang = "hl=" & "en"
TrnsFrom = "sl=" & "en"
TrnsTo = "tl=" & "ar"
TXT = "My Car" ' orActiveCell
StrUrl = "https://translate.google.com/?" & IELang & "&tab=wT1&authuser=0#view=home&op=translate&" & TrnsFrom & "&" & TrnsTo & "&text=" & TXT
With IE
.Navigate StrUrl
.Visible = True
SendKeys String:="{F12}" ' call Inspect Elements
While .Busy Or .ReadyState < 4: DoEvents: Wend
'.Document.queryselector(".ttsbutton").Click ' or
Application.Wait Now + TimeValue("00:00:01")
.Visible = True ' reactive IE for "Ctrl+4 " SendKeys String:="^4"
' Some time work smoe not work
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SendKeys String:="^4" ' call Inspect Elements Network
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
While .Busy Or .ReadyState < 4: DoEvents: Wend
.Document.queryselector(".src-tts").Click ' all of them work will
'.Quit
Set IE = Nothing
End With
End Sub
Private Sub ClosingIE()
On Error Resume Next
Dim objWMI As Object, objProcess As Object, objProcesses As Object
Set objWMI = GetObject("winmgmts://.")
Set objProcesses = objWMI.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'iexplore.exe'")
For Each objProcess In objProcesses
Call objProcess.Terminate
Next
Set objProcesses = Nothing: Set objWMI = Nothing
On Error GoTo 0
End Sub