View Full Version : Opening MS Office Applications from PHP

01-23-2004, 02:19 PM
Dear All,

I have written an application in PHP and now I want it to open a Word Document by clicking on a hyperlink within my PHP application – I’d also like to do the same for opening an Outlook email too.

When either documents are open I’d like to open it with some text automatically inserted into the document i.e. ‘Hello this is a test document’ or whatever.

I’ve been browsing round for a few days now but still haven’t found a good starting point.

My question is: Has anyone done anything like this before and know some good web sites explaining how to do this kind of thing or know of any simple code that can do this …or, can even it be done at all?

I’d be grateful if anyone out there has some useful advice.


01-23-2004, 02:36 PM
Do you run your PHP application on a Windows OS?

01-23-2004, 02:48 PM
Yes, the server is Windows 2000 Server and the clients are XP and 2000 professional. Sorry about neglecting to mention that!:)

01-23-2004, 02:53 PM
Fine, in this case you can use the COM extension:

Look for example code snippets in the comments at the bottom of that page. Hth.