Jump to Real's How-to Main page

Remove HTML tags to keep only text

OLEObject IE
OLEObject IEdoc
String ls_text

IE = CREATE OLEObject
IE.ConnectToNewObject("InternetExplorer.Application")

IE.left=200
IE.top=200
IE.height=400
IE.width=400
IE.menubar=0
IE.toolbar=1
IE.statusBar=0
IE.navigate("http://www.rgagnon.com/donate.html")
IE.visible=0   // 1 to see IE

DO WHILE IE.busy
LOOP

ls_text = IE.Document.Body.innerText

MessageBox("HTML -> TEXT", ls_text)
// if needed, save the context of ls_text into File

IE.Quit()

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]