Results 1 to 5 of 5

Thread: how to convert an html document to plain text?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    389

    how to convert an html document to plain text?

    Read the title thanks

    Or how To Parse the source

  2. #2
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: how to convert an html document to plain text?

    Html is plain text already.

    The simplest would be to replace all "<BR>" with vbCrLf.

    Tables would be a bit more work.
    Best is to first determine how the table looks (find which opening and closing tags belong to eachother) and then write it as text.

    Plain text doesn't contain pictures so you can just leave the tags as they are or strip them to just the image's url.

    It really depends to what extent you wish to convert the page and which data you want to keep.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    389

    Re: how to convert an html document to plain text?

    ok How would I do that?

  4. #4
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: how to convert an html document to plain text?

    Do what?

  5. #5
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: how to convert an html document to plain text?

    http://www.vbforums.com/showpost.php...2&postcount=18

    with the HTML Object Library you use .innerText to just get the Text (without all the HTML tags) or .innerHTML to get everything ..

    Also see this for ideas on parsing the HTML ..
    http://www.vbforums.com/showthread.p...85#post2525685

    Rory
    Last edited by rory; Aug 3rd, 2006 at 08:12 PM.

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