Ask Your Question

Writer Macro to collect and insert data from Base Query

asked 2020-04-16 13:32:34 +0200

Ardee gravatar image

updated 2020-04-18 01:27:14 +0200

My environment: Windows 10, LibreOffice Version: (x64) HSQLDB Version 2.3.2 Split Database

Is it possible for a macro launched on opening a writer template to insert some textfields from a specific base query?

Could anyone suggest code or guide me to documentation or an example please. Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-04-18 02:04:52 +0200

Ratslinger gravatar image


OOME (Open Office Macros Explained) section 14.10 - Text fields

Has code regarding text master fields. Document link was provided to you in your first question -> How to Get and Put data from/to form fields with a macro

Another consideration is that since a Base form is nothing more than a Writer document, you already know how to use controls on a form. Can use macros to rest of processing.

edit flag offensive delete link more


@Ratslinger, many thanks for responding. The magic words to help me wade through documentation were "master text fields", a new concept to me. I may have skimmed over it browsing the documentation previously because there is mention of DDE and I remember somewhere in this forum someone who said DDE had been abandoned by LO.

I suppose I have to apologize again for being a newbie culturally still on immigrant status from MSOffice barely culturally integrated into LO society's common knowledge.

I couldn't find any reference to master text fields in the forum, or a tutorial elsewhere, a sample odt/ott with some code would have been a great help to get me on my way, however a few days of testing with Andrew Pitonyak's documentation in hand will get me there too, I see there is some sample code to work on.

Thank you. I'm ...(more)

Ardee gravatar imageArdee ( 2020-04-18 14:12:29 +0200 )edit

Hey I got it, simple as pie. After all those tutorials abt headers footers styles even mailmerge all similar to MSWord that I found that didn't help me understand, I finally found a Writer tutorial that gave an example of creating a fillable pdf document, that led me to understand how all the controls of a Base form are there in writer and simply used just like in Base. I hadn't grasped that at all, expecting Writer to be like MSWord. How easy, I'm full speed ahead again and realize my question was so self-evident it should not have even been asked, but hey, I'm a newbie.

Ardee gravatar imageArdee ( 2020-04-18 23:08:13 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-04-16 13:32:34 +0200

Seen: 62 times

Last updated: Apr 18