OFF97: Limitations of ActiveX Control Support in Office DocumentLast reviewed: May 13, 1997Article ID: Q168392 |
The information in this article applies to:
SUMMARYThis article discusses the limitations that you may encounter when you use an ActiveX control in a document created in a Microsoft Office program.
MORE INFORMATIONThe following section describes the limitations for using an ActiveX control in a Microsoft Office program. The limitations listed in this article may not apply to all Office programs.
Some ActiveX Controls Do Not Support IDataObjectThe ActiveX control container implementations in Microsoft Word, Microsoft Excel, and Microsoft PowerPoint use the IDataObject interface not the IViewObject interface to draw controls. ActiveX controls that do not support IDataObject and require IViewObject support in containers do not work in Word, Microsoft Excel, or PowerPoint documents. IViewObject is an interface that is used by some ActiveX control containers to draw the control inside the window of the container application. Word, Microsoft Excel, and PowerPoint do not use IViewObject to draw controls that they contain; they use another interface called IDataObject exclusively for this purpose. As a result, certain ActiveX controls that do not support IDataObject do not work inside of Word, Microsoft Excel, and PowerPoint documents. To determine whether an ActiveX control requires support for the IViewObject interface, contact the control vendor. NOTE: Microsoft Access does not have this limitation and can host controls that do not support IDataObject. UserForms in Word, Microsoft Excel, and PowerPoint do not have this limitation and can host controls that do not support IDataObject.
Container Must Support IViewObject to Properly Display ActiveX ControlsAn ActiveX control may behave unpredictably when displayed in multiple views of the same document. For an ActiveX control to appear and function properly in multiple windows or panes of the same document, the container application must support the IViewObject interface. Because Word, Microsoft Excel, and PowerPoint do not support this interface (as discussed in the previous section), the behavior of an ActiveX control that is viewed in two different windows or panes of the same document may be unpredictable. NOTE: Microsoft Access does not have this limitation because it supports the IViewObject interface.
Some Programs Do Not Support ISimpleFrameSiteThe ActiveX control container implementations in Microsoft Access, Word, Microsoft Excel, and PowerPoint do not support the ISimpleFrameSite interface. Simple frame ActiveX controls do not work inside documents created with these programs. A class of ActiveX controls called simple frame controls implement an interface called ISimpleFrame and work only inside containers that support the ISimpleFrameSite interface. Microsoft Access, Word, Microsoft Excel, and PowerPoint do not support ISimpleFrameSite and cannot host these controls. NOTE: UserForms also have this limitation.
In-Place Editing Limitations in Office ProgramsActiveX controls in a Microsoft Excel worksheet are disabled when you are editing in place. For example, the controls are disabled when Microsoft Excel is activated as an OLE object inside a container application, as an ActiveX document inside Microsoft Internet Explorer, or in Office Binder. This limitation is specific to Microsoft Excel. When you are editing in place in Microsoft Excel inside a container application, you cannot activate ActiveX controls in Microsoft Excel worksheets. When you click an ActiveX control while Microsoft Excel is in in-place editing mode, the following alert message appears:
That control can only be used while the worksheet is displayed in a separate window. Do you want to open a window for the worksheet?This alert message has Yes and No buttons. Clicking No results in no action; clicking Yes opens the object in its native Microsoft Excel window. The control is fully functional in this window. Note that in in-place editing mode in a Microsoft Excel worksheet, ActiveX controls are displayed correctly. You can select them in design mode. You are restricted only from activating these controls. If it is important that controls are fully functional when you edit in place in an Microsoft Excel worksheet, you can use built-in Microsoft Excel controls that are available on the Forms toolbar. When you click an ActiveX control while you are editing in place in a Microsoft Word document, Microsoft Word menus and toolbars unmerge from menus and toolbars that belong to the ActiveX document container. When you are editing in place in a Microsoft Word document and you activate an ActiveX control by using the interface, toolbars and menus unmerge from menus and toolbars that belong to the container application. For example, this behavior occurs when you click a button control in a Microsoft Word document that is embedded in Microsoft Internet Explorer. When the focus returns to the Microsoft Word document, the Microsoft Word toolbars and menus merge with the menus of the container application. When you work with an ActiveX control that is in a Microsoft Word document and is activated as a Binder section or as an ActiveX document inside of Microsoft Internet Explorer, menus and toolbars may disappear, and then reappear.
Microsoft Excel Charts Cannot Contain ActiveX ControlsYou cannot insert ActiveX controls into Microsoft Excel charts. You can insert controls on top of chart objects that are embedded in a worksheet; however, these controls are not active when you click the chart.
Word, Microsoft Excel, and PowerPoint Do Not Support Component CategoriesWord, Microsoft Excel, and PowerPoint do not support ActiveX control categories. The implication is that controls that appear in the user interface to insert non-Office controls may not necessarily work in these Office programs. There is no filtering in the user interface based on component categories. For example, it is possible for an ISimpleFrame control to appear in the More Controls list for Microsoft Word even though it does not work. Microsoft Access supports component categories. Controls that are unsupported in Microsoft Access do not appear in the control list. Component categories are supported if the control vendor builds controls that support the categories. Some ActiveX Controls Are Not Automatically Downloaded When You Use Microsoft Internet Explorer When you browse an Intranet web with a mixture of Hypertext Markup Language (HTML) and Office documents by using Microsoft Internet Explorer 3.0 or later, ActiveX controls that are embedded in Office documents are not automatically downloaded to the client computer. In HTML pages that contain ActiveX controls, Microsoft Internet Explorer downloads ActiveX controls automatically. For example, the controls are downloaded when Office is installed on the client computer and you use only ActiveX controls that ship with Office in the document in question.
Miscellaneous limitationsThe following ActiveX control functions are not supported in Microsoft Access, Word, Microsoft Excel, or PowerPoint:
|
Keywords : kb3rdparty kbinterop kbole kbui kbusage offbinder offinterop offweb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |