Hello, I have a big problem to print an html file directly to the printer. I
use an "AxSHDocVw.AxWebBrowser" object. Briefly, this is my code:
AxSHDocVw.AxWebBrowser myBrowser;
....
//this set of instruction prepare my document in html to be printed
string HtmlFileName = "Test.html";
Object o = new Object();
o = System.Reflection.Missing.Value;
myBrowser.Silent = true;
myBrowser.Navigate(HtmlFileName);
// when it is ready the callback goes here
private void myBrowser_DocumentComplete(object sender, System.EventArgs e)
{
myBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER , ref o, ref o);
}
When i call it (ExecWB) it generates an exception "Trying to revoke a drop
target that has not been registered".
Someone know how I can solve this problem, or if there is a quicker o
simpler method to solve it?
Thank you,
Regards,
Andrea