Reputation: 18525
With the following code
<?php
$test="C:/wamp/www/test.doc";
com_load_typelib('Word.Application');
$word = new COM("word.application");
$word->Documents->Open($test);
$word->Visible = 1;
$word->ActiveDocument->FormFields("Text1")->Result = "test";
$word->ActiveDocument->Close(false);
$word->Quit();
unset($word);
?>
I get the following problem
Line 7 is $word->ActiveDocument->FormFields("Text1")->Result = "test";
What is the problem?
Upvotes: 0
Views: 759
Reputation: 331
We had the same problem with wamp on Windows 7. We finally solved the problem by performing the actions given in this php.net comment (although they are supposed to be useful for IIS) : http://php.net/manual/en/class.com.php#90814
I copy the main part here in case the original comment disappear :
Upvotes: 1