OLEMenuGroup Property
Applies To
CommandBarPopup object.
Description
Returns or sets the menu group that the specified command bar pop-up control belongs to when the menu groups of the OLE server are merged with the menu groups of an OLE client (that is, when an object of the container application type is embedded in another application). Can be one of the following MsoOLEMenuGroup constants: msoOleMenuGroupNone, msoOleMenuGroupFile, msoOleMenuGroupEdit, msoOleMenuGroupContainer, msoOleMenuGroupObject, msoOleMenuGroupWindow, or msoOleMenuGroupHelp. Read/write Long.
Note This property is read-only for built-in controls.
Remarks
This property is intended to allow add-in applications to specify how their command bar controls will be represented in the Office application. If either the container or the server does not implement command bars, normal OLE menu merging will occur: the menu bar will be merged, as well as all the toolbars from the server, and none of the toolbars from the container. This property is relevant only for pop-up controls on the menu bar because menus are merged on the basis of their menu group category.
If both of the merging applications implement command bars, command bar controls are merged according to the OLEUsage property.
Example
This example checks the OLEMenuGroup property of a new custom popup control on the active menu bar, and sets it to msoOLEMenuGroupNone.
Set myControl = ActiveMenuBar.Controls _
.Add(Type:=msoControlPopup,Temporary:=False)
myControl.OLEMenuGroup = msoOLEMenuGroupNone