Microsoft KB Archive/191615

= BUG: Menu Disabled in Application Activated Using OLE Control =

Article ID: 191615

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Office XP Developer Edition
 * Microsoft Office 2000 Developer Edition
 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q191615



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.

This problem also occurs when using the WebBrowser control instead of the OLE control.



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 (fixed in Word 2000 and Word 2002)

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

Keywords: kbbug kbcontainer KB191615

-

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

© Microsoft Corporation. All rights reserved.