User Profile
Collapse
-
Hey thanks, that is a great suggestion. I've been staring at the code and looking everywhere for examples and the code looks fine to me. It must be something in the configuration of either word or the configuration of php. I'll look into things further from both of those suggestions. Thanks! -
That is the line:
$word = new COM("word.appli cation") or die("Unable to instantiate Word");Leave a comment:
-
Hey thanks pbmods, that is an awesome suggestions, and to me makes more sense the way you have suggested. After I made the change from
$word->Documents[1]->SaveAs("test.d oc");
to
$word->ActiveDocume nt->SaveAs("test.d oc");
it gave me a time a timeout error. When I added set_time_limit( 0); at the first of the function and set_time_limit( 30); at the end of the...Leave a comment:
-
Thanks Atli,
I changed line 93 (now line 95, or line 14 from the snippet in my first post) so it now reads:
$word->Documents[0]->SaveAs("test.d oc");
I thought it was strange that it was accessing the second element of the array.
Now when I call the function (on my local machine still) I get this:
Loaded Word, version 12.0
Fatal error:...Leave a comment:
-
PHP COM MS Word Application
This is my first post here - yay! This is my function that I am calling (just passing test arguments):
Code:function makeDoc($name,$content){ // starting word $word = new COM("word.application") or die("Unable to instantiate Word"); echo "Loaded Word, version {$word->Version}\n"; //bring it to front $word->Visible = 1; //open an empty document
No activity results to display
Show More
Leave a comment: