1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| Sub WaitIE(IE As InternetExplorer)
'On boucle tant que la page n'est pas totalement chargée
Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop
End Sub
'*****************************************************************************************************************************************************************
Sub ExplorerShel()
'Déclaration des variables
Dim IE As New InternetExplorer
Dim InputGoogleZoneTextefirst As HTMLInputElement
Dim InputBouton As HTMLInputElement
Dim onclick As HTMLDocument
Dim InputBoutonbis As HTMLInputElement
Dim htmlSelectElem As Range
'Affichage de la fenêtre IE
IE.Visible = True
IE.navigate "http://reports.flexiblecontactcenter.orange-business.com/Reports/Pages/Report.aspx?ItemPath=%2fG2R1C5%2fFRA%2fFile+d'attente%2fFile+d'attente+Export"
'*****************************************************************************************************************************************************************
'On attend le chargement complet de la page
WaitIE IE
'On pointe le membre Document
Set IEDoc = IE.document
'On pointe notre Zone de texte
Set InputGoogleZoneTextefirst = IEDoc.all("ctl31$ctl04$ctl05$txtValue")
'On définit le texte que l'on souhaite placer à l'intérieur
InputGoogleZoneTextefirst.Value = "01/03/2016"
WaitIE IE
'*****************************************************************************************************************************************************************
'*****************************************************************************************************************************************************************
WaitIE IE
'On pointe notre Zone de texte
Set InputGoogleZoneTextesecond = IEDoc.all("ctl31$ctl04$ctl07$txtValue")
'On définit le texte que l'on souhaite placer à l'intérieur
WaitIE IE
InputGoogleZoneTextesecond.Value = "05/03/2016"
'*****************************************************************************************************************************************************************
WaitIE IE
'On pointe notre bouton
Set InputBouton = IEDoc.all("ctl31$ctl04$ctl00")
'On simule un clic
InputBouton.Click
'*****************************************************************************************************************************************************************
#Quatriéme étape : Exporter les données sur excel
WaitIE IE
'Set onclick = IEDoc.all("ctl31_ctl09")
'htmlSelectElem = IEDoc("ctl31_ctl09")
'*************************************************************************************************************************************************************
'On libère la variable IE
Set IE = Nothing
End Sub |
Partager