How to convert HTML code to Txt
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 'System & API - How to convert HTML code to Txt 'Windows API/Global Declarations for Best HTML to TXT Converter(5 Lines!!) 'You need to reference "Microsoft HTML Object Library" ' HTML to TXT Converter ' Description:Converts HTML Strings to TXT Strings Removing all HTML Code ' Returns: String Public Function CleanHTML(TheHTML As String) As String Dim HtmlDOC As New HTMLDocument HtmlDOC.body.innerHTML = TheHTML CleanHTML = HtmlDOC.body.innerText Set HtmlDOC = Nothing End Function 'How to call this function 'Debug.Print CleanHTML("<br><table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td 'valign=top><a href=" & """http://news.google.com/news/url?sa=T&ct=us/1- '0&fd=R&url=http://www.washingtonpost.com/wp- 'dyn/content/article/2006/02/25/AR2006022500227.html&cid=0" & "><b>Google's</b> Latest Bundle of 'Goodies Is Worth Opening</a><br><font size=-1><font color=#6f6f6f>Washington Post, United 'States -</font> <nobr>10 hours ago</nobr></font><br><font size=-1><b>...</b> <b>RSS</b> feeds 'let you know when fresh content appears on washingtonpost.com pages that interest <b>...</b> 'Unlike many Internet freebies, <b>Google</b> Pack delivers genuine value. <b>...</b> '</font><br></table>") |
Related posts:
- How to Export an Access Database to HTML file
- How to Kills Html Tags
- 3 XML (Or HTML) Tag Reading Functions
- How to Convert to lower case using API
- How to Convert to Upper Case
- How to set background picture for form (like the background image of a HTML Document)
- How to get IP address from http://www.myipaddress.com/ (in two ways)
- How to display animated Gif in your program
- How to Convert a decimal number into a Roman number?
- How to Get all currently open IE and Explorer windows