Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You need to load the character style you want from a template during the process.
See the recent related thread https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745 in that other very valuable forum. My answer https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745#p457202 there may help you.

(Don't think it's OS dependent - except for the syntax of the template's pathname, of course.)
You need to load the character style you want from a template during the process.
See the recent related thread https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745 in that other very valuable forum. My answer https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745#p457202 there may help you.

(Don't think it's OS dependent - except for the syntax of the template's pathname, of course.)
You need to load the character style you want from a template during the process.
See the recent related thread https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745 in that other very valuable forum. My answer https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745#p457202 there may help you.

===Edit 2018-11-.14 22:20 regarding the comments=== I made a demo to better explain what I meant. It is attached here as an archive (.ods is a fake. Remove it.) containing a template, two plain-text files as examples, and the spreadsheet file where a parameter range is in B2:C4, and some scripts are in the module scripts of the Standard library.
Extract the files to a common empty folder, and open the spreadsheet file. Adapt the pathnames to the actual situation and save the ods anew. A commandline for Win is prepared now in cell A20. Adapt the elements to the needs of a Mac.
If you now run the command from a terminal you will need to act on a prompt. This is unavoidable for security reasons if code from a file shall run. An alternative is, to move the scripts module to the local Standard library and to change location=docukent to location=application in the query part of the command URI.

(Don't think it's OS dependent - except for the syntax of the template's pathname, of course.)
You need to load the character style you want from a template during the process.
See the recent related thread https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745 in that other very valuable forum. My answer https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=95745#p457202 there may help you.

===Edit 2018-11-.14 22:20 regarding the comments=== comments===
I made a demo to better explain what I meant. It is attached here as an archive (.ods is a fake. Remove it.) containing a template, two plain-text files as examples, and the spreadsheet file where a parameter range is in B2:C4, and some scripts are in the module scripts of the Standard library.
Extract the files to a common empty folder, and open the spreadsheet file. Adapt the pathnames to the actual situation and save the ods anew. A commandline for Win is prepared now in cell A20. Adapt the elements to the needs of a Mac.
If you now run the command from a terminal you will need to act on a prompt. This is unavoidable for security reasons if code from a file shall run. An alternative is, to move the scripts module to the local Standard library and to change location=docukent to location=application in the query part of the command URI.