Skip to main content
1-Visitor
November 30, 2011
Question

Save and Open in OpenOffice (sh command)

  • November 30, 2011
  • 0 replies
  • 1568 views

Hi,

I have this code:

local i;

local dir;

local sAppPath;

for (i = 0; dir = get_custom_dir(i); i++) {

if (match("$dir",'bcfi')){

sAppPath = "$dir";

break;

};

}

local sTmpSave = "$sAppPath" . '\tmp\currexport.xml'

save_as "$sTmpSave";

sh 'C:\Program Files (x86)\OpenOffice.org 3\program\swriter.exe $sTmpSave'

It does save the current document in a custom application directory. So far ok, now i'm trying to start OpenOffice, no problem, bet then it fails to open the just saved XML document. I can not figure out the way I should pass the sTmpSave variable to the sh command, please help!?

Regards, Geurt Lagemaat