Please help...this is driving me insane!
In essence, I am taking an uploaded file in the form of a Word Document and then doing a print to file as a PostScript. Once, done I am using ps2pdf to create a pdf file. I can make this work for word and for excel using the generic printout() call. The problem I am running into deals with trying to specify the name of the file that will be printed. I can do it with Excel quite easily, but there is something in the Word printout method that does not work correctly and I cannot figure out why. Here is the basic code that works in Excel:
$book->PrintOut(NULL,NULL,NULL,NULL,"Tester",TRUE,FALSE,$targ_file);
The Word section, as a stated, does not work. Here is what I have been using.
$word->ActiveDocument->Printout(FALSE,NULL,wdPrintAllDocument,"TEST.ps",NULL,NULL,NULL,NULL,NULL,NULL,TRUE);
I using this method I receive a wrong datatype error (for the Range area). So if I change this to an arbitrary number, say 100, I then get an error of wrong datatype and a failed invoke. This is following the MS posted method for using the PrintOutMethod. Ideas?
Please help...this is driving me batty..especially since it works so well in Excel.....Thanks!