DOCUMENT:Q191615 24-AUG-1998 [vbwin] TITLE :BUG: Menu Disabled in Application Activated Using OLE Control PRODUCT :Microsoft Visual Basic for Windows PROD/VER: OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, versions 5.0, 6.0 --------------------------------------------------------------------- SYMPTOMS ======== On a form in Visual Basic, you use the OLE control to embed a document, such as a Microsoft Word document. If the server application is already running when you in-place activate the OLE control, the menu and toolbars in the server application are disabled while the OLE control is in-place activated. This problem does not occur if the server application is started after the OLE control is in-place activated. STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATION ================ This problem occurs when using the following objects in the OLE control: Microsoft Excel Worksheet Microsoft Word Document To avoid problems using the menu and toolbars in the server application, activate the OLE control in its own window. To do this, set the MiscFlags property of the OLE control to 2 (VbOLEMiscFlagDisableInPlace), or use the vbOLEOpen constant with the DoVerb method when programmatically activating the OLE control. Steps to Reproduce Behavior --------------------------- 1. Start Microsoft Excel or Microsoft Word. 2. Start Visual Basic and create a new Standard EXE project. Form1 is created by default. 3. Add an OLE control to Form1. The Insert Object dialog appears. 4. Select "Microsoft Excel Worksheet" if you started Microsoft Excel in step 1, or "Microsoft Word Document" if you started Microsoft Word in step 1. Click OK to insert a new object into the OLE control. 5. Press the CTRL+F5 key combination to run the project. 6. Double-click the OLE control on Form1. Note that the object is in-place activated and a menu appears in Form1. The menu functions properly in the OLE control. 7. Switch back to the application you started in step 1 and try to use its menu and toolbars. The menu and toolbars in the server application are disabled. If you start the server application after in-place activating the OLE control, the menu and toolbars function properly. Additional query words: kbDSupport kbDSD inplace kbVBp kbVBp600bug kbVBp500bug kbActiveX kbContainer ====================================================================== Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.