Results 1 to 5 of 5

Thread: Checking New Mail In Gmail With WebBrowser

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Question Checking New Mail In Gmail With WebBrowser

    I'm creating a prog that will send a text message to the user's mobile fone when they receive new emails in their Gmail account. I have the code to send the text message done but I still cannot find a way to get the names/emails of the senders of the new emails. I think I will do it by finding text that is in bold "<b>" and then parse out the name from that, but I can't manage to get the correct HTML for the gmail inbox. They are using frames and when I use the code:
    VB Code:
    1. 'Needs reference to Microsoft HTML Object Library
    2. Dim objHTML As New MSHTML.HTMLDocument
    3. Set objHTML = Web.Document.frames.Item(1).Document
    4. Debug.Print objHTML.body.innerHTML
    I only get some Javascript, but not enough to find what I'm looking for.
    Basically I need to get the html from some frame or iFrame but I have looked thru all the frames (I think) and I still cannot find the html that contains the name or subject of the unread emails.
    Thanx,
    Shiraz
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Checking New Mail In Gmail With WebBrowser

    Anyone?
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Checking New Mail In Gmail With WebBrowser

    look at the other HTML declares for the object library..

    you may need to play with stuff like HTMLiFrame or framebase... and loop through
    testing each one till you find it?

    this one sounds like a trial & error...
    example of what I mean...
    VB Code:
    1. Dim xFrame As HTMLFrameBase 'or something
    2. Dim HTML As HTMLDocument
    3. Set HTML = Wbe.Document
    4. For Each xFrame In HTML.frames
    5.     Debug.Print xFrame.innerHTML
    6. Next
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Checking New Mail In Gmail With WebBrowser

    OK, I'll try it out. If you check out the html on the site using firefox and click "This Frame" > "View Source" when right clicking in the inbox area you will see the source code which I want to get.
    Thanx,
    Shiraz
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Checking New Mail In Gmail With WebBrowser

    Anyone have a way for me to do this coz I really dont know how to use trial & error for this. I need to know where the text for the new emails is. Is there a program to tell me where something is located?
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

Posting Permissions

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



Click Here to Expand Forum to Full Width