// Load the template
$dateNow = nowUS();
$TBS->MergeField('time', '11:00 am');
// Define the name of the output file
$file_name = "new_patient" . date('Y-m-d-H-i-s').".odt";
// Output as a download file (some automatic fields are merged here)
echoing the $file name shows: new_patient2009-12-11-17-11-29.odt
but when I run it live the windows download dialogue shows that, but when when I open it in OO it shows that the file name is new_patient2009-12-11-17-11-29.odt.htm and windows tries to open it as a web page.
Suggestions for debugging ?
(BTW: I decided I could not do this in ajax so I have the program pop open a new window for the download, which works a treat.