Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Word and COM

Status
Not open for further replies.

mThomas

Instructor
May 3, 2001
404
US

I have a project where users will need to open a Word document inside a browser. The users opening the Word document will allow/set IE to open Word in a browser. I figured using com would be the way to go.

I have a Windows server where I installed PHP 5.2.11. I have been able to write php scripts, however opening a Word document is driving me nuts.

I am getting a 500 error when I try the following code copied from php.net:

<?PHP

$word = new COM("word.application") or die("Unable to instantiate Word");

?>

The users will need to be able to open an existing Word document. Edit the document and then save it all within a broswer. The reason is the project must be HIPAA compliant and having the Word document opened in Word on a users computer presents HIPAA issues.

So, the main questions is, Can I open a Word document on a server running Windows 2008 64bit?

Can this be done?

Why is the above code producing an error? Is it because I do not have Word installed on the server?

Is there a setting in the PHP.ini file I need to set to allow IE to render a more detailed error report, sort of like debug="true"?

I've tried all sorts of various ways I've seen posted, most of which use the above code in some fashion.

Any help is appreciated.

mike
 
might i suggest a still deeper change in philosophy? keep the data in text/markup format that is understandable by the web. use tinymce of fckeditor as the text input device. do not store in rtf or similar. simply export to that format when you need to. unless you are going to implement a sharepoint solution.

the answer to your question is probably. rtf is just a text file with display codes built in. i do not recall whether the author included a manipulator as well as a creator factory. take a look at the code, it should be evident.
 
I did take a look at the code, but don't see a way to open a file using the editor. I'll keep trying.

tia...mike
 
it is not an editor. it is an exporter. it is essentially an api whereby you can create an rtf file given certain inputs.

for an editor you should look at fckeditor or tinymce.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top