User Profile

Collapse

Profile Sidebar

Collapse
Downugo
Downugo
Last Activity: Oct 10 '08, 09:20 PM
Joined: Oct 7 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Downugo
    replied to PHP COM MS Word Application
    in PHP
    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!
    See more | Go to post

    Leave a comment:


  • Downugo
    replied to PHP COM MS Word Application
    in PHP
    That is the line:

    $word = new COM("word.appli cation") or die("Unable to instantiate Word");
    See more | Go to post

    Leave a comment:


  • Downugo
    replied to PHP COM MS Word Application
    in PHP
    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...
    See more | Go to post

    Leave a comment:


  • Downugo
    replied to PHP COM MS Word Application
    in PHP
    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:...
    See more | Go to post

    Leave a comment:


  • Downugo
    started a topic PHP COM MS Word Application
    in PHP

    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
    ...
    See more | Go to post
    Last edited by pbmods; Apr 3 '09, 11:30 PM. Reason: Fixed CODE tags.
No activity results to display
Show More
Working...