Is there any script to open the document. I don't want the user to click on the document for viewing it ,instead open the document automatically for view once user access a particular folder.
Well there is document preview link which appear in browser when you see particular document.Now issue with your requirement is that folder could contains multiple documents if you show document on click of folder link how you are going to access rest of the documents? And from all those documents which one you want to show?