WebBrowser ActiveX will not print in Windows Server 2008
Posted on 2010-11-10
We run a Microsoft Access application on a Windows Server 2008 R2 box.
One particular form is used for printing HTML-coded documents. This features a webbrowser activex control.
The control's navigate method will load the page correctly. When calling the print method, nothing actually prints out:
Me.WebBrowser1.Object.ExecWB 6, 2, 0, 0
The URL are in the trusted sites zone, protected mode is turned off. "Initialize and script ActiveX controls not marked as safe" is enabled, as is "Run ActiveX controls and plugins"
I tried it on a sample html document with a very simple structure:
If I open the document in a regular browser window, it prints no problem, so clearly the server environment is imposing a security restriction on the the ActiveX control.
It is not only the ExecWB method that is failing. If I right-click in the window using the context-sensitive menu, and select Print, it will give me the dialog box to print, but when clicking "Print" nothing comes out the printer.
Any suggestions to turn off this security on my ActiveX control? Is there an alternative ActiveX control that people know of that doesn't incur the same lock-down in Windows Server 2008?
This behaviour only happens in Windows Server 2008 R2. The form works correctly on all desktops and Windows 2003 server boxes (where the IE group policy lock-down isn't so secure).
thanks for any advice