I want php to start MS Word. I tried this but I receive an error:
1 <?php
2 $word = new COM("Word.Application") or die("Unable to instanciate Word");
3 $word->Visible=1
4 $word->Documents->Add("c:/test.doc");
5 $word->Quit();
6 $word->Release();
7 $word = null;
8 ?>
Error:
Warning: (null)(): Invoke() failed: Er is een uitzondering opgetreden. Source: Microsoft Word Description: De opslagruimte voor macro's kan niet worden geopend. in C:\Documents and Settings\sam\Mijn documenten\Werkmap\Sam\html\TMP1brqelb8k6.php on line 4
I tried the same with the Excel-Object:
In that case I don't receive an error but I cannot see the excel-workbook.
What am I doing wrong?