rebol [ Title: "Internet Explorer Print" File: %IEPrint.r Date: 29-Jun-2006 Version: 1.0.2 Progress: 0.4 Status: "not tested all the way to printing" Needs: [] Author: "Anton Rolls" Language: "English" Purpose: {Print from Internet Explorer} Usage: {} History: [ 1.0.0 [6-Jun-2006 {First version} "Anton"] 1.0.1 [25-Jun-2006 {converted to work with the newly reengineered comlib.r} "Anton"] 1.0.2 [29-Jun-2006 {revised for new do/args usage} "Anton"] ] ToDo: { - } Notes: {} ] if error? set/any 'error try [ ; catch all errors do/args %../COMLib.r [ ; Use the COMLib API functions here wdFormatHTML: 8 OLECMDID_PRINT: 6 OLECMDEXECOPT_DONTPROMPTUSER: 2 OLECMDEXECOPT_PROMPTUSER: 1 ieApp: CreateObject "InternetExplorer.Application" CallMethod [ieApp ".Navigate(%s)" "About:blank"] ;Options foreach [format value][ ".Toolbar = %s" "0" ".StatusBar = %s" "0" ".Width = %s" "640" ".Height = %s" "480" ".top = %s" "200" ".Left = %s" "200" ][ PutValue [ieApp format value] ] CallMethod [ieApp "Document.Writeln(%s)" "REBOL EULA"] CallMethod [ieApp "Document.Writeln(%s)" ""] save/png clean-path %logo.png logo.gif CallMethod [ieApp "Document.Writeln(%s)" rejoin [ "" "^/" "
^/" "

^/" system/license "^/" "

^/" "" ]] PutValue [ieApp ".Visible = %s" "1"] CallMethod [ieApp ".ExecWB %d, %d" OLECMDID_PRINT OLECMDEXECOPT_DONTPROMPTUSER] CallMethod [ieApp "Document.Print()"] ; I don't have a printer installed on my system and I get this error message: ; Object doesn't support this property or method: 'Print' while [ busy?: to-logic getInteger [ieApp ".Busy" "" false] ][ ;?? busy? wait 0.5 ; wait half a second ] release ieApp ] ][ print mold disarm error ]