You will have to replace "c:\winnt\system32" with your system32
directory. Also, "%1" should be replaced with the HTML file that you want
to print. You can call the static Start method on the Process class to run
this.
If you want something of a more programattic nature, then I would
recommend using the WebBrowser control and then getting the Document
associated with it. The document exposes an implementation of the
IHTMLDocument2 interface, which exposes a parentWindow property. The return
value from this property can be cast to the IHTMLWindow3 interface, which
has a print method you can call to print the document.
Hope this helps.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.