I've used this:–
Runcommand('C:\Program Files\LibreOffice\program\swriter.exe',['d:\Current Files\test.odt'],sout);
And it works fine, but I think runcommand causes the program to hang. So, I've converted to ShellExecute:–
if ShellExecute(0,nil,PChar('C:\Program Files\LibreOffice\program\swriter.exe'),PChar('d:\Current Files\test.odt'),PChar(''),1)=0
then form1.label1.caption:='FAIL.'
else form1.label1.caption:='OK.';
It works for all programs this application opens (Word, Excel, etc), except for LibreOffice. LibreOffice Writer creates an error: it can't find 'd:\current'. It's that space in 'Current Files'. Is there a solution to this? A way of passing a space without it being a parameter terminator or something?