It worked fine the first time (I sent it to a network printer and it printed without any errors). Now I get the following error:
Run-time error -2147221248
Method 'ExecWB' of object 'IWebBrowser2' failed
And when I click Debug and then continue, it prints. But I don't want this user interaction.
Can anyone tell me what is wrong with this code? A similar code in VB.Net always works like a charm for me.