[Solved] My macro does not trigger automatically

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
ahamedck
Posts: 4
Joined: Thu Mar 11, 2010 9:39 am

[Solved] My macro does not trigger automatically

Post by ahamedck »

Pay Bill of (AEE)-copy-7a.ods
When the contents of the cell D15 is changed my macro should be triggered automatically.
(19.75 KiB) Downloaded 233 times
My macro does not trigger automatically even though there is Listener

In my file the number of duty days(in cell D15) should not be less than ZERO and hence when it becomes -ve the macro should be triggered and the causing cells ( thee in my case ) is to be made zero


I am using LiberOffice 4.0 under Windows/Ubuntu 10.4
Last edited by Hagar Delest on Sat May 04, 2013 11:04 am, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.2 on LINUX Fedora 11
FJCC
Moderator
Posts: 9397
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: my macro does not trigger automatically

Post by FJCC »

I ran your macro that creates the Listener and then modified one of the input cell for D15 and the macro worked. I do not see any automatic running of the Listener creation when the document is opened, so I think you have to add that. In the menu Tools -> Customize, on the Events tab, you can tie your Main macro to the Open Document event.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
ahamedck
Posts: 4
Joined: Thu Mar 11, 2010 9:39 am

Re: My macro does not trigger automatically

Post by ahamedck »

Please tell me how,

Ahamed
OpenOffice 3.2 on LINUX Fedora 11
FJCC
Moderator
Posts: 9397
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: My macro does not trigger automatically

Post by FJCC »

Go to the menu Tools -> Customize and then select the Events tab. Click on Open Document in the list of events and then click on the Macro button. After a few seconds a Macro Selector dialog will open. Your document should appear in the list of Libraries on the left. Click on its + sign, choose the library and then select the macro that creates the listener from the list on the right. Click Ok to close all the dialogs. Save the document and close it. The next time you open the document the listener should load automatically.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
ahamedck
Posts: 4
Joined: Thu Mar 11, 2010 9:39 am

Re: My macro does not trigger automatically

Post by ahamedck »

Thank God,

I appreciate the time and effort you, dear friend, made in this regard. I had made a bug report under
https://bugs.freedesktop.org/show_bug.cgi?id=63984
I think this is solved

Ahamed
OpenOffice 3.2 on LINUX Fedora 11
Post Reply