-1

I have a command button in vb 6.0 ,now on clicking that command button i want to read the content of URL(means what that URL is writing there).

code:

Private Sub Command2_Click()
Dim obj As Object
Set obj = CreateObject("InternetExplorer.Application")

obj.Navigate2 "http://10.0.0.13/tuvrandom"
obj.Visible = True
End Sub

It will display the content of that page Eg:"google" but i want to read the whole thing what that page is writing.

user2273064
  • 19
  • 1
  • 5

1 Answers1

1
Private Sub Command2_Click()
    Dim obj As Object

    Set obj = CreateObject("InternetExplorer.Application")

    obj.Navigate2 "http://10.0.0.13/tuvrandom"
    obj.Visible = True
    While obj.Busy Or obj.ReadyState <> 4
        DoEvents
    Wend

    ' read the document property for what you want
    ' text = obj.Document.Body.InnerHtml
End Sub

You can explore the Internet Explorer object model here, http://msdn.microsoft.com/en-us/library/ms970456.aspx

jac
  • 9,666
  • 2
  • 34
  • 63