+ Reply to Thread
Results 1 to 3 of 3

Getting html document of a webbrowser/SHDocVw.InternetExplorer control's tab

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    oc,ca
    MS-Off Ver
    Excel 2003
    Posts
    44

    Getting html document of a webbrowser/SHDocVw.InternetExplorer control's tab

    My program uses the webbrowser object and it opens two tabs in the obj by using the following code:
    Please Login or Register  to view this content.
    How do I get the html code of tab "f1" and tab "f2"? if there's is 1 tab, then I could simple do

    Set htmldoc = Webbrowser1.Document

    to reference the html document. But since there are two tabs, the statement "Set htmldoc = Webbrowser1.Document" fails to execute.

  2. #2
    Registered User
    Join Date
    09-19-2011
    Location
    oc,ca
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Getting html document of a webbrowser/SHDocVw.InternetExplorer control's tab

    bump for some help

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Getting html document of a webbrowser/SHDocVw.InternetExplorer control's tab

    Hello david90,

    If you want to retrieve the HTML page source for a given a URL there is a faster way than using Web Browsers. The code below will retrieve the HTML document (page source) for a given URL.

    The HTML Document text is saved to the Public string PageSource. The object Variable Doc is the Document object converted from the HTML source. This should be loaded into a VBA module.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1