I am attempting to use PHP with SoftArtisan's MS Word Doc Writer.
I have it SAVING the file just fine, but I can't get it to output for a "Save As" Dialog box in PHP.
Here is the working code:
<?php
$name = "big.nerd";
$ext = "1234";
$usd = "$29.90";
$cad = "$36.22";
$notes = "These are\n\nNotes";
$item = "12345";
$desc = "This is the Item Description";
$namesarr = Array("Name", "Ext","Usd","Cad","Notes","Item","Desc","DateTime");
$valuesarr = Array($name, $ext, $usd, $cad, $notes, $item, $desc, date("M d, Y"));
$handle = new COM("SoftArtisans.WordTemplate") or die("Unable to instanciate Word Class");
$path_only = implode("/", (explode('/', $_SERVER["SCRIPT_FILENAME"], -1)));
$handle->Open($path_only."/PriceUpdate.doc");
$handle->SetDataSource($valuesarr, $namesarr);
$handle->Process;
$handle->Save("$path_only/BasicGenerated.doc", false);
echo "File Successfully created. <a href=\"./BasicGenerated.doc\">BasicGenerated.doc</a>";
?>
The Part that I can not figure out is "Save". The ASP Code is:
WordTempl.Save Response, "BasicGenerated.doc", False
' Or
' WordTempl.Save Page.Response, "BasicGenerated.Doc", False
Does anyone have any ideas?
Thanks in advance