SharePoint2010:从用户控件中打开文档 -Open document(s) in Office web apps (from User controls)

As I understand, you want to show the Office documents using  Office Web Apps. Instead of using the ECB actions, you want to open it using Hyperlink, am I right?

 

When you try to view the word document in Brower, you will get a url like this:

http://servername/_layouts/WordViewer.aspx?id=/Shared%20Documents/test.docx&source=..

 

In your custom Hyperlink, only the ‘id’ parameter is needed. So the link like this: http://servername/_layouts/WordViewer.aspx?id=/Shared%20Documents/test.docx.

Word: http://servername/_layouts/WordViewer.aspx?id=/Shared%20Documents/test.docx.

Excel: http://servername/_layouts/xlViewer.aspx?id=/Shared%20Documents/test.xlsx.

PPT: http://servername/_layouts/PowerPoint.aspx?PowerPointView=ReadingView&PresentationId=/Shared%20Documents/test.pptx.

你可能感兴趣的:(SharePoint)