Streaming text to standalone IE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does someone have some sample code on how to launch a new instance of IE and
write text to it directly from code in a form using something like OLE.

I can write the text to a file and then launch a new instance of IE and have
IE open that file without an issue but I would like skip the file creation if
possible and just write the text directly to IE.

Here is the code I've got now:

Set InfoFile = fso.CreateTextFile("c:\stream.html", True)
InfoFile.WriteLine oPoster.responseText
InfoFile.Close
objShell.ShellExecute "iexplore", "c:\stream.html"
fso.DeleteFile("c:\stream.html")

and I would like to rewrite it without using the FSO object.
 
See whether this works for you:

Dim oIE As Object

Set oIE = CreateObject("InternetExplorer.Application")
With oIE
.navigate "about:blank"
.Visible = True
.Document.writeln oPoster.responseText

' The following are all optional, but you can play with them to see the
effects:
.Document.Body.Title = "Debug Messages"
.Toolbar = False
.AddressBar = False
.Top = 10
.Left = 10
.Width = 300
.Height = 300
.MenuBar = False
.StatusBar = False
End With
 
Back
Top