Zizi64 wrote:Try the LibreOffice, try to record a "save as..." procedure by the Macro recorder. Then you will see the exact name of the OOXML filter in the recorded code.
That's a great tip, thank you! Using the recorder I could look at the filter names that were used, and could produce documents in different formats.
For ODT
Code: Select all
pv_filtername = PropertyValue()
pv_filtername.Name = "FilterName"
pv_filtername.Value = "writer8"
document.storeToURL("file:///path/to/file.odt", (pv_filtername,))
For DOCX
Code: Select all
pv_filtername = PropertyValue()
pv_filtername.Name = "FilterName"
pv_filtername.Value = "MS Word 2007 XML"
document.storeToURL("file:///path/to/file.docx", (pv_filtername,))
For DOC
Code: Select all
pv_filtername = PropertyValue()
pv_filtername.Name = "FilterName"
pv_filtername.Value = "MS Word 97"
document.storeToURL("file:///path/to/file.doc", (pv_filtername,))
For Office Open DOCX
Code: Select all
pv_filtername = PropertyValue()
pv_filtername.Name = "FilterName"
pv_filtername.Value = "Office Open XML Text"
document.storeToURL("file:///path/to/file.docx", (pv_filtername,))
Addendum. This thread queries the registry for supported file formats that AOO is able to read. Above filter names can be found in that same registry.
Mac 10.14 using LO 7.2.0.2, Gentoo Linux using LO 7.2.3.2 headless.