kena1921 Posted December 21, 2006 Share Posted December 21, 2006 HiI need to be able to display a Word Document within the a browser - i.e. I don't want the document to download or Word to open but the contents of the document to be displayed within the browser itself. Is there any way of doing this with PHP?Many thanksKen Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/ Share on other sites More sharing options...
noobstar Posted December 21, 2006 Share Posted December 21, 2006 Why don't you just set the access levels on the word document so if someone tries to modify or delete the text in it it won't allow them Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/#findComment-145814 Share on other sites More sharing options...
obsidian Posted December 21, 2006 Share Posted December 21, 2006 If you are running the PHP script on a server that has MS Word installed, you can simply use the COM extension, and you can read or write Word docs. Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/#findComment-145817 Share on other sites More sharing options...
HuggieBear Posted December 21, 2006 Share Posted December 21, 2006 You could try looking at the COM object.http://uk.php.net/manual/en/ref.com.phpRegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/#findComment-145820 Share on other sites More sharing options...
kena1921 Posted December 22, 2006 Author Share Posted December 22, 2006 Thanks - I will have a look at this. Would this also be the same for other document types such as excel and Powerpoint??The restricting access levels suggestion unfortunately is not practical in the circumstances.Many thanksken Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/#findComment-146364 Share on other sites More sharing options...
HuggieBear Posted December 22, 2006 Share Posted December 22, 2006 [quote author=kena1921 link=topic=119495.msg490132#msg490132 date=1166789255]Would this also be the same for other document types such as excel and Powerpoint??[/quote]Yes it would.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/#findComment-146365 Share on other sites More sharing options...
kena1921 Posted December 22, 2006 Author Share Posted December 22, 2006 Thanks again - I am reasonably new to PHP although I do have a fair amount of programming experience, so what level of expertise would you say is required to do this via COM objects. Is it something you can pick up fairly quickly or is it more in the expert category?? Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/#findComment-146373 Share on other sites More sharing options...
HuggieBear Posted December 22, 2006 Share Posted December 22, 2006 I don't know to be honest, I'd have thought it's probably less what you know about PHP and more on what your COM knowledge is like.Unfortunately for me, the latter is non-existent :)RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/31464-viewing-word-documents-within-a-browser/#findComment-146375 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.