OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-05-2007, 23:37
Panjtan
Guest
 
Posts: n/a
Default 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.
Reply With Quote
  #2  
Old 04-05-2007, 03:55
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

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

Code:
newmenu (maybe) bc6d3e54-d8cd-449a-aa61-cd442d6617eb
separator              266435b4-6e53-460f-9fa7-f45be187d400
try...
Reply With Quote
  #3  
Old 04-05-2007, 05:21
Panjtan
Guest
 
Posts: n/a
Default

Thanx,

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


Code:
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"
Reply With Quote
  #4  
Old 15-05-2007, 08:32
Manuel
Guest
 
Posts: n/a
Default

Pardon my ignorance, but what's the advantage of adding a new menu via VBA versus doing it through Tools/Customization...?
Reply With Quote
  #5  
Old 29-12-2012, 12:14
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Default

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:
Code:
  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!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I add a new menu to the coreldraw by the VBA levin CorelDRAW/Corel DESIGNER VBA 15 17-07-2011 14:35
How to add the popup menu in CorelDraw using C# Panjtan CorelDRAW/Corel DESIGNER VBA 1 09-05-2007 22:48
Where to begin with CorelDRAW and VBA shelbym CorelDRAW/Corel DESIGNER VBA 2 03-04-2007 09:15
Accesing CorelDraw 10 VBA Object Model without running it dolmos CorelDRAW/Corel DESIGNER VBA 5 19-12-2003 07:52
CorelDraw 11 VBA DOM? sdickson CorelDRAW/Corel DESIGNER VBA 2 03-12-2002 15:05


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


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