Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: Office Application That Hosts a Custom ActiveX Control Fails on the Save or Save As Method

View products that this article applies to.

This article was previously published under Q279408

↑ Back to the top


When you add a custom ActiveX control to an Office application document, and then try to save the document, the Office application may report an error or fail (crash) before the document can be saved.

This problem does not occur when you remove the control or when you add the control to a Microsoft Visual Basic for Applications (VBA) form.

↑ Back to the top


When you add an ActiveX control to an Office document, Office requests two metafiles to render the control when the control is not active: one for display while the document is in design mode, and one for printing when the document needs to be printed. When Office requests the second metafile, a control must build a device context (DC) for the current (default) printer, which Office specifies as the target device. Some third-party printer drivers have been found to cause problems when they are accessed in this manner and may cause this operation to fail or fault when done.

Because commonly used ActiveX control containers (such as Visual Basic) do not request this type of metafile, the problem may appear to be specific to Office containers, although it is not.

↑ Back to the top


To resolve this problem, change the default printer, or update your printer driver.

↑ Back to the top

More information

For more information on control-related problems in Office, visit the Microsoft Office Development support site:

↑ Back to the top

Keywords: KB279408, kbprb, kbctrl

↑ Back to the top

Article Info
Article ID : 279408
Revision : 8
Created on : 1/5/2007
Published on : 1/5/2007
Exists online : False
Views : 375