Microsoft KB Archive/279408

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

Article ID: 279408

Article Last Modified on 1/5/2007

-

APPLIES TO


 * Microsoft Office Excel 2003
 * Microsoft Excel 2000 Standard Edition
 * Microsoft Office PowerPoint 2003
 * Microsoft PowerPoint 2000 Standard Edition
 * Microsoft Office Word 2003
 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q279408



SYMPTOMS
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.



CAUSE
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.



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



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

http://support.microsoft.com/ofd

Keywords: kbctrl kbprb KB279408

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.