Page 1 of 1

[Solved] How to Add a menu to the calc menu bar, via macro

Posted: Mon Oct 21, 2019 11:22 pm
by martius
How to add a menu to the calc menu bar, via macro? Thanks

Re: How to Add a menu to the calc menu bar, via macro

Posted: Wed Oct 23, 2019 8:38 am
by Zizi64
It is not enough to add your macros to the menu bar or to the toolbar manually? Do you want to do it dynamically? (Do you want often change it?)

If you want to do it on more than one PC, then it is better to withe your macros as an Extension. You can control the menu entries automatically by an extension - when you install it.
There are extension written in StarBasic. Just download them, unpack them, and you will able examine the code lists in side the extension. An .oxt extension is a .zip file really, but with different name of the three-letter file extension.

Re: How to Add a menu to the calc menu bar, via macro

Posted: Wed Oct 23, 2019 11:41 am
by martius
Thank you for the suggestion about an extension. But, in my case, it would be much more simple if I could use a macro. I even know a macro to add a button to a toolbar, but I want to add a new menu, with sub-menus, to the menubar. I still hope that someone know how to do it via macro and can help me with some tips. Thanks anyway.

Re: How to Add a menu to the calc menu bar, via macro

Posted: Wed Oct 23, 2019 12:06 pm
by JeJe
There's this page here:

viewtopic.php?f=20&t=69575

Re: How to Add a menu to the calc menu bar, via macro

Posted: Wed Oct 23, 2019 12:13 pm
by Villeroy
I even know a macro to add a button to a toolbar,
If you would know anything, you could easily find out how to create a toolbar and how easy it is to do it by configuration rather than code (unless someone else writes the code for you, of course).

Re: How to Add a menu to the calc menu bar, via macro

Posted: Wed Oct 23, 2019 12:25 pm
by JeJe

Re: How to Add a menu to the calc menu bar, via macro

Posted: Wed Oct 23, 2019 4:25 pm
by martius
Thank you all and especially jeje for the link https://wiki.openoffice.org/wiki/API/Sa ... rites-Menu
This link was exactly what I needed to learn how to do what I intended. :super: :bravo: