[win32com] Print html
Alex Martelli
alex at magenta.com
Fri Aug 11 17:02:33 EDT 2000
"Bill Scherer" <Bill.Scherer at VerizonWireless.com> wrote in message
news:39945697.F47A13EE at VerizonWireless.com...
> Hello,
>
> I'm looking for a way to automate printing html on win32 with python.
> Currently, I'm able to load IE5 as a com object and get it to load a
> document.
> I can get the document object from the IE5 object.
> Neither object seems to have a print method of any kind.
> Any ideas?
IWebBrowser2::ExecWB takes as its first parameter the
OLECMDID (numeric code) of the command you want IE to
execute.
OLECMDID_PRINT = 6 is the one you want.
The second parameter encodes the options; for example,
OLECMDEXECOPT_DONTPROMPTUSER = 2 to proceed without a
confirmation prompt to the user.
I think you don't need to specify the 3rd and 4th
parameters, but, do experiment.
Alex
More information about the Python-list
mailing list