Hi there!
I am trying to print a document after merging some data into it using PHP
COM and it seems to be very tempremental and doesn't work at all over
network printers. When I say tempremental, if it works on a machine it
works, no question, but if it doesn't it just goes nowhere and doesn't say
anything at all.
Defintely works on Windows XP Pro, but again tempremental, once it wasn't
working and I did everything possible, all office updates etc. but gave up
and just re-installed windows and it worked fine.
Windows 2000, i think i've had it working
Windows 2000 Server, not working.
All using Office 2000, but even tried the Office 2003 on Windows 2000 Server
and nothing at all.. :( It seems very badly documented.
The code I use to print: (a simplified just to do the task)
<?
$empty = new VARIANT();
com_load_typelib('Word.Application');
$word = new COM('word.application') or die('Unable to load Word');
print "Loaded Word, version {$word->Version}\n<br/>";
$word->Documents->Open("c:/templates/Options.doc");
$output="";
$word->ActiveDocument->PrintOut(0,0,0,$output);
?>
Is there any known good resources for doing this? Can anyone shed any light
on this?!!
Any help will be grately appreciated!
Peter