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
| Call GetSourceHtml
Function GetSourceHtml
Set ie = CreateObject("InternetExplorer.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
dim adresse
adresse = "http://www.google.fr"
ie.Navigate (adresse)
Do While ie.Busy
WScript.Sleep (100)
Loop
WScript.Sleep (1000)
GetSourceHtml = ie.document.body.innerhtml
Set OutPut = fso.CreateTextFile("sourcehtml.txt",2)
OutPut.WriteLine GetSourceHtml
MsgBox GetSourceHtml,64,"Source HTML"
ie.Quit
Set ie=Nothing
Explorer "sourcehtml.txt"
End Function
Function Explorer(File)
Set ws=CreateObject("wscript.shell")
ws.run "Explorer "& File & "\"
end Function |
Partager