One of my friend and colleague asked me this question. I found it tricky and a good post for my blog. Here is what you have to do:

Go to your 12 hive\TEMPLATE\LAYOUTS\1033 folder. Open up the Core.js file. Find the function AddSendSubMenu. Go to the last 3 lines:

strAction = "STSNavigate('" + ctx.HttpRoot + "/_layouts/download.aspx?" + "SourceUrl=" + currentItemEscapedFileUrl + "&Source=" + GetSource() + "&FldUrl=" + escapeProperly(ctx.SendToLocationUrl) + "')"; ;
menuOption = CAMOpt(sm, L_DownloadACopy_Text, strAction, "");
menuOption.id = "ID_DownloadACopy";

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Now if you want to remove "Download a Copy" option from all the document libraries then comment all three lines.

If you want to remove it for some custom List Definition that you have created you may do like:

if(ctx.listTemplate !=10001)
{ strAction = "STSNavigate('" + ctx.HttpRoot + "/_layouts/download.aspx?" + "SourceUrl=" + currentItemEscapedFileUrl + "&Source=" + GetSource() + "&FldUrl=" + escapeProperly(ctx.SendToLocationUrl) + "')"; ;
menuOption = CAMOpt(sm, L_DownloadACopy_Text, strAction, "");
menuOption.id = "ID_DownloadACopy";
}

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

Where 10001 was your custom list template id.

If you want to do it for a specific Document Library then you would do like this:

if(ctx.listName !="{28958B49-8C76-4987-815C-CF5A107FF522}")
{ strAction = "STSNavigate('" + ctx.HttpRoot + "/_layouts/download.aspx?" + "SourceUrl=" + currentItemEscapedFileUrl + "&Source=" + GetSource() + "&FldUrl=" + escapeProperly(ctx.SendToLocationUrl) + "')"; ;
menuOption = CAMOpt(sm, L_DownloadACopy_Text, strAction, "");
menuOption.id = "ID_DownloadACopy";
}

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

As you can see you have to pass the list GUID as listName.

SharePoint 2007 (MOSS/WSS) - how to remove "Download a Copy" context menu from a Document Library的更多相关文章

  1. How to remove unwant Internet Explorer Context Menu

    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt

  2. SharePoint Designer定制MOSS/WSS表单页面

    转:http://blog.csdn.net/yl_99/article/details/7087897 方法一.使用SharePoint Designer配合enderingTemplate文件来定 ...

  3. Extending your SharePoint 2007 site with Microsoft ASP.NET AJAX 3.5

    After ASP.NET 3.5 has been installed you need to modify the web.config file of your MOSS web site wi ...

  4. SharePoint 2007 页面定制(一)

    转:http://www.nanmu.net/SharePoint-MOSS-WSS-Silverlight/Lists/Posts/Post.aspx?ID=74 本文主要包括以下几方面内容: 1. ...

  5. 在Vista或Windows 7系统上安装Sharepoint 2007

    在Vista或Windows 7系统上安装Sharepoint 2007 2010-03-05 18:53:19|  分类: 技术文章|字号 订阅     SharePoint 2007 不能直接安装 ...

  6. SharePoint 2007 form.js兼容性修改

    因SharePoint 2007发布时微软的主要IE的版本是7,所以其中不少的JS是不规范的,在新的IE8 9 10 11等版本中碰到不少的问题,以下是部分的修复,记录下,不断完善. ()语法问题 d ...

  7. SharePoint Document Library中的"Versioning Settings"功能与CSOM的对应

     博客地址:http://blog.csdn.net/FoxDave SharePoint文档库关于版本的设置:"Versioning Settings",可以通过CSOM用L ...

  8. PowerShell 批量签入SharePoint Document Library中的文件

    由于某个文档库设置了编辑前签出功能,导致批量导入文件时这些文件默认的状态都被签出了.如果手动签入则费时费力,故利用PowerShell来实现批量签入Document Library中的文件. Reso ...

  9. SharePoint 2013 Step by Step—— How to Upload Multiple Documents in Document Library

    How to Upload Multiple documents in SharePoint 2013,Options to add multiple files in a document libr ...

随机推荐

  1. CSS自学笔记(7):CSS定位

    很多时候,我们需要对一些元素进行自定义排序.布局等,这是就需要用到CSS的定位属性了,用这些属性对一些元素进行自定义排序.布局等操作,可以改变浏览器默认的死板的排序. CSS定位的功能很容易理解,它允 ...

  2. MFC渐入渐出框实现方式二

    类似360消息弹出框,实现方式一见http://blog.csdn.net/segen_jaa/article/details/7848598. 本文采用另外的API实现渐入渐出效果. 主要API:S ...

  3. 2016 Multi-University Training Contest 8 总结

    回家之后一堆的事情,最后两场多校都没怎么参加,终于现在有些时间可以把第八场的总结补上. 欣君开局看出06题公式,我照着写,一A,差一分钟拿到FB,有点可惜. 磊哥觉得11题水题,写了一下,一A. 欣君 ...

  4. linux 查看信息命令

    # uname -a # 查看内核/操作系统/CPU信息# head -n 1 /etc/issue # 查看操作系统版本# cat /proc/cpuinfo # 查看CPU信息# hostname ...

  5. zoj2729 Sum Up(模拟)

    Sum Up Time Limit: 2 Seconds      Memory Limit: 65536 KB Vivid has stored a piece of private informa ...

  6. linux重新编译内核

    一.linux内核 1.查看linux内核版本 uname -r 2.下载对应的linux内核 https://www.kernel.org/pub/linux/kernel/ 将内核文件夹解压到/u ...

  7. linux性能监控三张图

    一.监控 二.测试 三.优化

  8. c# 小数的处理

    数值类型处理小数 1.Math.Round(x) 四舍五入      Math.Round(0.4) 0     Math.Round(-1.7) -2 2.Math.floor(x) 小于等于 x, ...

  9. Jquery中的delegate()使用方法介绍

    delegate() 方法为指定的元素(属于被选元素的子元素)添加一个或多个事件处理程序,并规定当这些事件发生时运行的函数 delegate定义和用法 delegate() 方法为指定的元素(属于被选 ...

  10. 正整数从1到N,输出按照字典序排序的前K个数

    #include <iostream> #include <cassert> using namespace std; ; char a[max_len]; void topK ...