dim objExplorer
open_ie
objExplorer.Document.Body.InnerHTML = HTMLTextfile("c:\test\test.htm")
'-------------------------------------------------------------------------------------------------------------------------------
' open ie
'-------------------------------------------------------------------------------------------------------------------------------
sub open_ie
Set objExplorer = CreateObject("InternetExplorer.Application")
with objExplorer
.Navigate "about:blank"
.ToolBar = 0
.StatusBar = 0
.Width=1200
.Height = 600
.Left = 1
.Top = 1
.Visible = 1
End with
end sub
'-------------------------------------------------------------------------------------------------------------------------------
' open fileobject
'-------------------------------------------------------------------------------------------------------------------------------
function HTMLTextfile(pathfile)
Const ForReading = 1
HTMLScr = ""
pathfile = trim(pathfile)
Set objFSO = CreateObject("Scripting.FileSystemObject")
set objFile = objFSO.GetFile(pathfile)
Set objReadFile = objFSO.OpenTextFile(pathfile,ForReading)
Do Until objReadFile.AtEndOfStream
HTMLScr = HTMLScr & objReadFile.ReadLine
Loop
HTMLTextfile = HTMLScr
objReadFile.Close
end function