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 05-05-2012, 07:48
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Question Create Menu and submenus - VBA

I am experienced enough in working with VBA Excel. Now I started working in Corel Draw (X5) and I try to make a menu with submenus in existing 'Menu bar'. I tried to find similar threads but I couldn't find something to make things clear enough. I mean there are possibilities to do that using XML but I would like to know if it is possible on not to make that using only VBA.
I found some code and using the next one and a refference to 'Corel - VGC 15.0 Type library' I could create a Menu (control) between the existing ones, but I do not know how to create submenus, to allocate procedures to that...
Code:
Dim oButton As CommandBarControl
Set oButton = Application.CommandBars.Item("Menu Bar").Controls.AddCustomButton("2cc24a3e-fe24-4708-9a74-9c75406eebcd", "Test", 8, False)
With oButton
    .Visible = True
    .ToolTipText = "Test..."
End With
Since I am able to create it I suppose that it sould possible to do also what I need.
If you know that it is not possible using just VBA I will try it using XML, but I would preffer VBA...
Is there another GUID to be used for meniu creation? It looks I created a button, not a menu...

I delete the new Meniu/Control using:
Code:
Application.CommandBars.Item("Menu Bar").Reset
Thanks in advance!
Reply With Quote
  #2  
Old 24-05-2012, 03:18
cha
Guest
 
Posts: n/a
Default

I tried the same but i'm using vb.net(2010). I wrote a small program for me to make some things easier for me. In my Form i have insert a MenuStrip.
There it works fine with
Code:
 draw.FrameWork.CommandBars("Menu Bar").Controls.Add("bc6d3e54-d8cd-449a-aa61-cd442d6617eb", "xx")
draw is defined as Coreldraw.application in my case.

The ControlID is stored in xml-file..there is a thread that could help you:

http://forum.oberonplace.com/showthr...ight=controlid

Maybe this helps
Reply With Quote
Reply

Tags
create new menu, procedure allocation, submenus


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 15:35
Simple Menu kunghel CorelDRAW/Corel DESIGNER VBA 10 14-07-2010 12:52
How I can add my own menu on menu bar Vlada CorelDRAW/Corel DESIGNER VBA 4 28-08-2006 19:53
create a toolbar/menu for all my macros mgmcs Macros/Add-ons 2 25-05-2006 21:17
Can I create CustomShape with VBA for CD? Can I create tool? Jab CorelDRAW/Corel DESIGNER VBA 0 01-02-2005 06:02


All times are GMT -5. The time now is 06:51.


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