2
Hello I am using the following code to start a dowload in Intenet Explorer.
Public Sub Dashboard()
Dim Navegador As InternetExplorer
Dim objShellWindows As New SHDocVw.ShellWindows
Dim currentWindow As HTMLWindowProxy
Dim url As String
On Error GoTo Erro
url = "http://..................../"
Set Navegador = New InternetExplorer
Navegador.navigate url
Navegador.Visible = True
Do While Navegador.readyState <> 4
DoEvents
Loop
'Faz login
Navegador.document.getElementById("usuario").Value = "xxxxxxxx"
Navegador.document.getElementById("senha").Value = "xxxxxx"
Navegador.document.getElementById("bt_entrar").Click
' Set Navegador = Nothing
' Set Navegador = New InternetExplorer
' Navegador.navigate url
' Navegador.Visible = True
Do While Navegador.readyState <> 4
DoEvents
Loop
Navegador.document.getElementById("submenu2_SatisfacaoGeral").Click
Set currentWindow = Navegador.document.parentWindow
currentWindow.execScript code:="chart.exportChart()"
Erro:
MsgBox Err.Description
Resume Next
End Sub
turns out I don’t know how I can "save as download" by setting the folder and the file name.
Ever tried to use this method?
– danieltakeshi
This does not suit my case, the script I run, already starts the Download, I need to manipulate the IE window by changing file name and save location. De;
Set JanelaSite = IE.document.parentWindow
 JanelaSite.execScript code:="chart.exportChart()"
 
 Application.Wait (Now + TimeValue("0:00:02"))
 JanelaSite.Focus
 'JanelaSite.document.execCommandShowHelp ("SaveAs")
 tela.SendKeys "{TAB}"
 tela.SendKeys "{TAB}"
 tela.SendKeys "{DOWN}"
 tela.SendKeys "{DOWN}"
 tela.SendKeys "{ENTER}"
– Rodolfo Rocha Dos Santos
I don’t know about IE, but if it’s useful, I found some links: 1, 2,3
– danieltakeshi