Friday, February 24, 2012

Hide "Send To" Menu Item option in a documents context menu

Hide "Send To" option in a documents context menu. Add CEWP on document library view page and the below script to it.

<script type="text/javascript">
 _spBodyOnLoadFunctionNames.push("resetAddSendSubMenu()");

 function resetAddSendSubMenu()
{
   AddSendSubMenu = function (m,ctx) {};
 }
</script>

It turned out to be very simple by doing this:
  1. Go to the document’s view url, for example: http://example.com/Documents/Forms/AllItems.aspx.
  2. If it is a web part page, edit the page and add a Content Editor web part. Otherwise you need to edit that page in SharePoint Designer.
  3. Open the source editor (not the rich editor) for the Content Editor web part, or open the code view (not the design view) of that particular page in SharePoint Designer.
  4. Either inside the web part or the code view, insert the following script:
<script type=”text/javascript”>
AddSendSubMenu = function (m,ctx) {}
< /script>


Read more: http://www.information-worker.nl/2009/09/02/remove-send-to-menu-option-in-sharepoint-document-library/#ixzz1nKqK3mrv

No comments:

Post a Comment