OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   How to add the popup menu in CorelDraw using VBA (http://forum.oberonplace.com/showthread.php?t=3166)

Panjtan 03-05-2007 23:37

How to add the popup menu in CorelDraw using VBA
I wish to use a code:

Application.MainMenu.Controls.Add (ControlID as String).

for creation of the popup menu.

What is the ControlID and where to take it for new menu item.

wOxxOm 04-05-2007 03:55

this is excerpt from <!--User Menus--> section of c:\Program Files\Corel\CorelDRAW Graphics Suite 13\Programs\UIConfig\CorelDRAW\DrawUI.xml


newmenu (maybe) bc6d3e54-d8cd-449a-aa61-cd442d6617eb
separator              266435b4-6e53-460f-9fa7-f45be187d400


Panjtan 04-05-2007 05:21


I already tried to do so. But at addition of the button I receive an error: Run-time error:


Application.FrameWork.CommandBars("Menu Bar").Controls.Add("bc6d3e54-d8cd-449a-aa61-cd442d6617eb").Caption = "MyMenu"

Application.FrameWork.CommandBars("MyMenu").Controls.AddCustomButton("2cc24a3e-fe24-4708-9a74-9c75406eebcd", "GlobalMacros.RecordedMacros.MyRectangle").Caption = "Mysubmenu"

Manuel 15-05-2007 08:32

Pardon my ignorance, but what's the advantage of adding a new menu via VBA versus doing it through Tools/Customization...?

FaneDuru 29-12-2012 12:14

It is an old thread but it would be nice to create a menu with some sub menus using 'GlobalMacroStorage_Start()' and deleting it in 'GlobalMacroStorage_Quit()' event. Without other custom menus we can use for deletion:

  Application.CommandBars.Item("Menu Bar").Reset
Did you discover in the meantime what guid/ControlID to be used for creating a Menu through VBA?

Thanks in advance!

All times are GMT -5. The time now is 23:52.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com