Toolbar textbox

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
freddy
Posts: 3
Joined: Tue Dec 04, 2007 1:03 pm

Toolbar textbox

Post by freddy »

ok, this ought to be easy, but it seems it isn't. Having manually appended a textbox to the standard toolbar in writer, how does one put some text in it in a macro?
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: Toolbar textbox

Post by TerryE »

The coding paradigm is somewhat different to MSOffice. The short answer is that you basically have to declare an event which is bound an object (this could be a cell in a spreadsheet for example, or in this case textbox) to an action and a procedure with the same. You do this though start-up code which you hook into application through an initialisation routine hooked in through the Tools->Customize->Events->Open Document event. If you just want to add anew menu item then you do it through the same mechanism. You store the macro code in the document or in a template.

The long answer is that you need to read up on how to do this. Start with OpenOffice.org Wiki — FAQ Macros
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
Post Reply