Yes, the OO API is complex and has a steep learning curve. Add to that the fact that the official documentation is opaque. On this forum the common recommendation is that to make full use of SQL and proper database design and rely on macro programming as a last resort.
It isn't entirely clear what you are trying to accomplish.
Are you sure you need a macro for this?
InsertByName() is used to programmatically add a new control to a form. Is that what you want?
Or are you trying to change the Column heading “ColumnName” on the table to “Example”?
Or are you trying to insert the string “Example” into a table cell in the column “ColumnName”?
Look here for a list of macro programming resources.
viewtopic.php?f=39&t=13396&p=64815&hili ... ide#p64815
Many of those are free downloads.
If you don't already have the macro programming documents from Andrew Pintonyak see:
http://www.pitonyak.org/oo.php
You also might find The Star Office Basic Programmers Guide helpful
https://wiki.openoffice.org/wiki/Docume ... ASIC_Guide
One book I found particularly helpful was “Database Programming with OpenOffice.org Base & Basic” by Roberto Benitez.
http://www.baseprogramming.com/%20%20%2 ... urces.html
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11