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

WinInet
plus

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

Print a Web Page


Question:

I want to open internet explorer like www.cnn.com, print that to default printer and close it. Does anyone have idea how to do this.

Answer:

AddExtender("WWINT34i.DLL")

URL = "http://www.windowware.com"
saveas= "c:\temp\abc.htm"

proxy= "proxy-server"

; Normal Direct Connect

tophandle=iBegin(1,proxy,"")
datahandle=iUrlOpen(tophandle,URL)
if datahandle==0
err=iGetLastError()
Message("Last Error",err)
iClose(tophandle)
exit
endif
xx=iReadData(datahandle, saveas)
iClose(datahandle)
iClose(tophandle)

Run ('rundll32.exe','MSHTML.DLL,PrintHTML "c:\temp\abc.htm.html"')

Message("All","Done")
exit

Article ID:   W16377
File Created: 2017:07:28:12:58:48
Last Updated: 2005:02:18:11:20:06