Results 1 to 1 of 1
  1. #1
    New Lounger
    Join Date
    Feb 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel vba to get IE source

    I'm using the following sub

    Code:
    Sub Open_Webpage(ByVal strURL As String)
             
        'Dim ie As Object
        Dim ie As SHDocVw.InternetExplorer
        Set ie = CreateObject("InternetExplorer.Application")
        ie.Visible = True
        ie.Navigate strURL
        Do While ie.Busy
            DoEvents
        Loop
        strResponse = (ie.Document.body.outerHTML)
        'strResponse = (ie.Document.body.innerHTML)
        ie.Visible = False
        ie.Quit
        Set ie = Nothing
    End Sub

    The contents returned in strResponse is not the complete source as seen by using the view source command on the ie view of the web page, so I can't extract the information I need. What am I doing wrong. (IE 10, Excel 2010)

    StrResponse was OK. I was checking it using the immediate screen which has limited available space.
    Last edited by Buford Carter; 2013-09-21 at 10:42.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •