Hello,
I have a LibreOffice Base database with a form button that runs a Basic macro to print seed envelopes. The macro works well: it opens a Writer template (Print_Rotated.ott ), loops through the shapes on the DrawPage, and fills text boxes with values from the currently selected record in the Base form.
The macro uses the shape names as database field names. For example, a shape named common_name gets filled with the value from the common_name field. This works well for printing individual seed envelopes.
I would now like to expand this so that the printed envelope also includes a table showing all cultivation practices for the selected plant.
My goal is:
- Select a plant record in a Base form
- Press the print button
- Open the Writer template
- Fill the existing text shapes as before
- Populate a table in the Writer document with multiple rows of cultivation information related to that plant
For example:
| Practice | Details |
|---|---|
| Seed starting | Start indoors 6 weeks before last frost |
| Transplanting | Plant out after danger of frost |
| Harvest | Collect mature seed pods |
Any suggestions or examples would be appreciated.
here is a link to the database in case you want to download it and try some things. https://www.dropbox.com/scl/fo/jn3vw6944r3yjehotwqrx/AJcsRG0D58ZXx8P35H_GV-w?rlkey=mi4zuwym4bh153bquk64ieusa&st=dt5rfqoz&dl=0
Thank you.