Working with the printer is a pain...
I had an idea to display what I wish to print as a web page in a hidden webbrowswer and the tell that webbrowser to print
webbrowser1.print
but there is not print method
there must be a way!
Printable View
Working with the printer is a pain...
I had an idea to display what I wish to print as a web page in a hidden webbrowswer and the tell that webbrowser to print
webbrowser1.print
but there is not print method
there must be a way!
Here's a way to do it:
That print one will just print whatever is it there right out. If you use OLECMDEXECOPT_PROMPTUSER, you'll get a dialog to change stuff like number of copies and so on.Code:'to print
WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
thanks this is going to make printing reports etc great!
what if the webbrowser is not visible
Hmm.. I'm not sure about that. I made my own browser with it once, and never tried that possibility. I'm inclined to say it would work, but you'll never know until you try heh heh.
I just made the browser 1 x 1 and stuck it off the side of the form
one more PROBLEM
what if i don't want it to print the page 1 of 1 and then
file//c: and the date on the page.
I just want the page
[Edited by kurtsimons on 10-27-2000 at 12:48 PM]
Sorry I didn't reply for a while, but I've been preparing for some grad exams. Anyway, I don't know how you could suppress those things from printing, but I'd be willing to say it could be done. And I tested out the visible thing for myself, and it seemed to work fine (but you probably already know that).