use code/script/CGI to load a LibreOffice document

view story

http://www.linuxquestions.org – I've created a document for LibreOffice that uses data fields for parts of the content. I know how to load the data fields from a spreadsheet or database. I'm looking for ways to load fields from some code or scripts. Can anyone help me with this? I know that LibreOffice Writer will tolerate and even act on VBA macros found in M$-Office docs that it imports. It seems that one opens a document, then included macros run, your document happens. Does this mean that I launch writer with my target document, macro-equipped template from the command line. The macros grab the data, then save and close (HowTos)