You cannot print a page and you receive an error message in an application that hosts a WebOC that uses a custom print template in Internet Explorer 8

Consider the following scenario:
  • On a computer that has Windows Internet Explorer 8 installed, you run an application.
  • The application hosts a Web Object Control (WebOC) that uses custom print templates in Windows Internet Explorer.
  • You previously used the OLECMDEXECOPT_DONTPROMPTUSER option in the source code to disable the Print dialog box.
  • You use the application to print a page by using a custom print template.
In this scenario, the page is not printed. Also, you receive a script error message in the printer.printpage line of the source code.
This issue occurs in a WebOC application in Internet Explorer 8 because the print dialog box element cannot locate the page that should be printed.

Security update information

To resolve this problem, install the most current cumulative security update for Internet Explorer. To install the most current updates, visit the following Microsoft Web site:
For more technical information about the most current cumulative security update for Internet Explorer, visit the following Microsoft Web site:
Note This update was first included in security update 978207 (MS10-002). For more information, click the following article number to view the article in the Microsoft Knowledge Base:
978207 MS10-002: Cumulative security update for Internet Explorer

Steps to reproduce the problem

  1. Download the Printtemplates.exe sample application, and then run the application. To download this application, visit the following Microsoft Web site:
  2. On the drop-down menu next to Template Source, select template 2.
  3. Click Print w/o Prompt.
Template 2 is not printed, and you receive the following script error message:
Line: 95

Char: 2

Error: Unspecified error.

Code: 0

URl: res://printtemplates.exe/sampledesc.htm
OLECMDEXECOPT_DONTPROMPTUSER OLECMDEXECOPT_PROMPTUSER prompt unspecified error script error print error WebBrowser Control WebOC

Article ID: 973538 - Last Review: 10/22/2009 06:11:23 - Revision: 2.1

Windows Internet Explorer 8

  • kbautohotfix kbexpertiseinter kbqfe kbhotfixserver kbsurveynew kbprb KB973538