Hi I am currently working on a app that prints a html invoice using Internet Explorer. as follows
Dim internetExplorer As New SHDocVw.InternetExplorerClass()
Dim webBrowser As SHDocVw.IWebBrowser2 = CType(internetExplorer, SHDocVw.IWebBrowser2)
'// Make the web browser visible. //
webBrowser.Visible = False
'// Display empty page so we have something to manipulate.
Dim noValue As Object = System.Reflection.Missing.Value
webBrowser.Navigate("file://" + fileName, noValue, noValue, noValue, noValue)
Threading.Thread.Sleep(1000)
'// Get access to the webbrowser's document.
Dim htmlDoc As mshtml.IHTMLDocument2 = internetExplorer.Document
Dim o As Object = ""
htmlDoc.execCommand("Print", False, o)
htmlDoc.close()
I read in the documentation that one can set a value for nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER for the dialog. I just can't seem to figure out where to set it. All help greatly appreaciated. Tx