1

When a view that has links to Office documents is added to a webpart the click event opens the document directly. But when the link is built using CAML and SP the click evokes the "Do you want to open the requested document." message

Is there some sharepoint magic dust that can be added to the programmatic construction of the link so that it opens the Office document similar to the view that is attached to the webpart?

Thanks

1
  • I use this anchor element: <a class="ms-listlink ms-draggable" onmousedown="return VerifyHref(this,event,'0','SharePoint.OpenDocuments','')" onclick="return DispEx(this,event,'TRUE','FALSE','FALSE','SharePoint.OpenDocuments.3','0','SharePoint.OpenDocuments','','','','115','0','0','0x7fffffffffffffff')" href="[file path]" DragId="93">[file_name]</a> extracted directly from the library greetings
    – Marco
    Jun 7, 2016 at 20:34

1 Answer 1

0

Looks like it need the ?Web=1. have added to the link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.