WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with MSIE
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

HTML to Text conversion with Internet Explorer 5

 Keywords:  

You have to start with a clipboard full of html source code.
Run this script.
Paste the result anywhere.
;------------------------------------------------------------------------------------------------------------------------------------------
; HTML to Text conversion with Internet Explorer 5.0 ClipBoard
; Detlev Dalitz.20030128
;------------------------------------------------------------------------------------------------------------------------------------------
oBrowser = ObjectOpen("InternetExplorer.Application")
oBrowser.navigate('javascript:window.clipboardData.getData("Text");')
While oBrowser.busy || oBrowser.readystate<>4
   Display(1,"HTML to Text","Get data from Clipboard.")
EndWhile
oBrowser.navigate('javascript:window.clipboardData.setData("Text",document.body.outerText);')
While oBrowser.busy || oBrowser.readystate<>4
   Display(1,"HTML to Text","Put data to Clipboard.")
EndWhile
ObjectClose(oBrowser)
Display(1,"HTML to Text","Ready.")
Exit
;------------------------------------------------------------------------------------------------------------------------------------------
Note: this code could be used from the context menu in WinBatch Studio.
Article ID:   W15655
File Created: 2003:05:13:11:29:22
Last Updated: 2003:05:13:11:29:22