BUG: Menu Disabled in Application Activated Using OLE Control

ID: Q191615


The information in this article applies to:


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:


Keywords          : kbActiveX kbContainer kbVBp kbVBp500bug kbVBp600bug kbGrpDSO kbOffice2000 
Version           : :; WINDOWS:5.0,6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: June 4, 1999