Is there a library of user-written macros?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Webby
Posts: 9
Joined: Tue Aug 16, 2016 2:32 pm

Is there a library of user-written macros?

Post by Webby »

Hi.

I've just started using OpenOffice 4.1.2 and I'm pretty impressed so far. One thing I'm missing though is an automated diary. I wrote a macro in Word that was invoked when I opened a document. It simply wrote a line at the bottom of the document with today's day and date and then exited. Rather than write it again for OpenOffice I was wondering if someone had done something similar and had made a copy of the macro(s) available somewhere for all to use. I can't find anything so far...
OpenOffice 4.1.2 on Windows 10 Home
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Is there a library of user-written macros?

Post by RoryOF »

In your default template in a header or footer /Insert /Fields /Other : Document tab, select Date and the format you require. Now save your new default template over the older copy.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Webby
Posts: 9
Joined: Tue Aug 16, 2016 2:32 pm

Re: Is there a library of user-written macros?

Post by Webby »

Sorry, I didn't explain that very well. My "diary" was just a single document interspersed with day & date lines within the text. I didn't mean a footer. For example:

Monday, July 22 2016 <<<<< this line created by a macro
I type here whatever I want e.g took car to garage for service...
Tuesday, July 23 2016
Garage rang re car...
Wednesday, July 24 2016
Thursday, July 25 2016

and so on.
OpenOffice 4.1.2 on Windows 10 Home
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Is there a library of user-written macros?

Post by RoryOF »

There are a few Diary templates; use
http://templates.openoffice.org/en/search?query=diary'
to find these. They are mostly for food diaries, but they may be easily adapted to general use, depending on your exact requirements.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Webby
Posts: 9
Joined: Tue Aug 16, 2016 2:32 pm

Re: Is there a library of user-written macros?

Post by Webby »

Thanks Rory. Unfortunately, nothing really hits the mark. If I could write a macro in Word I guess I can do the same in OpenOffice and I know Visual Basic so I shouldn't have too hard a time. I just didn't want to re-invent the wheel.
OpenOffice 4.1.2 on Windows 10 Home
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Is there a library of user-written macros?

Post by RoryOF »

OpenOffice macro language at its most detailed level is quite dissimilar from VBA; you may get away with something in OO BASIC.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Is there a library of user-written macros?

Post by RoryOF »

A collection of Diary templates for OO is at
http://www.downloadcollection.com/freew ... -diary.htm
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Webby
Posts: 9
Joined: Tue Aug 16, 2016 2:32 pm

Re: Is there a library of user-written macros?

Post by Webby »

Thanks Rory. I'll check thoose templates out later.

Thanks for your help.
OpenOffice 4.1.2 on Windows 10 Home
Post Reply