I'm trying to run an Open office command line instruction using Exec or Shell.
It's not working, but if I run exactly the same command from the terminal, it works as required.
The process uses 'soffice' to convert a writer document (.odt) file to a txt file.
Terminal command:
soffice --headless --convert-to txt "{path}/myfile.odt"
Exec["soffice","--headless","--convert-to","txt","{path}/myfile.odt"] Wait
Shell("soffice --headless --convert-to txt " & chr(34) & "{path}/myfile.odt" & chr(34)) Wait
The quote characters are required as the path has a comma in it - not ideal, but it is what it is.Again, this works from the command line but not from Gambas.
Any thoughts would be appreciated.
I've also use to "To" parameter to see if there is a resultant error message, but in both cases it returns nothing.
Useful fact: You can use the same command with html instead of txt to convert a odt document to html.