Hey guys,
I've been searching the forum, but haven't found a post describing the following problem:
I want to Open and Manipulate a word document using the COM class. This is my code so far:
$Wrd = new COM("Word.Application");
$DocName = TEMPLATE_DIR.'template.doc';
$Wrd->Application->Visible = True;
$WrdDoc = $Wrd->Documents->Open(realpath($DocName));
# do something here
$WrdDoc->SaveAs(realpath($DocName));
$Wrd->ActiveDocument->Close(false);
$Wrd->Quit();
$Wrd = NULL;
There's no problem creating the COM-object, but when i try
$WrdDoc = $Wrd->Documents->Open(realpath($DocName));
the browser is either complaining about insufficient memory or will chew on the code for ages...
I can see that a temporary word file is created, so it seems that the document has been opened... still, the browser is working and working....
can anyone tell me what's going on?
Many Thanks!