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

Creating a macro - Writing a Script - Using the API

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

Postby martius » Mon Oct 21, 2019 11:22 pm

How to add a menu to the calc menu bar, via macro? Thanks
Last edited by floris v on Thu Oct 24, 2019 1:15 pm, edited 2 times in total.
Reason: Tagged as Solved, floris v, moderator
LibreOffice 6.2.8.2 (x64), Windows 10 Home
martius
 
Posts: 53
Joined: Sat Feb 05, 2011 9:41 pm
Location: São Paulo, Brasil

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

Postby Zizi64 » Wed Oct 23, 2019 8:38 am

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.
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8557
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

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

Postby martius » Wed Oct 23, 2019 11:41 am

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.
LibreOffice 6.2.8.2 (x64), Windows 10 Home
martius
 
Posts: 53
Joined: Sat Feb 05, 2011 9:41 pm
Location: São Paulo, Brasil

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

Postby JeJe » Wed Oct 23, 2019 12:06 pm

There's this page here:

viewtopic.php?f=20&t=69575
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 631
Joined: Wed Mar 09, 2016 2:40 pm

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

Postby Villeroy » Wed Oct 23, 2019 12:13 pm

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).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27395
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Postby JeJe » Wed Oct 23, 2019 12:25 pm

Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 631
Joined: Wed Mar 09, 2016 2:40 pm

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

Postby martius » Wed Oct 23, 2019 4:25 pm

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:
LibreOffice 6.2.8.2 (x64), Windows 10 Home
martius
 
Posts: 53
Joined: Sat Feb 05, 2011 9:41 pm
Location: São Paulo, Brasil


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 5 guests