删除“保存并删除"发送"使用自定义XML从Excel 2010中的“文件"菜单中选择 [英] Remove "Save & Send" from File menu in Excel 2010 using custom XML

查看:190
本文介绍了删除“保存并删除"发送"使用自定义XML从Excel 2010中的“文件"菜单中选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我修改以下XML代码(Office 2007),使其在Office 2010中运行吗?我在下面包含了Office 2007中的XML:

Could someone please help me modify the following XML code (Office 2007) so that it works in Office 2010? I've included my XML from Office 2007 below:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
    <officeMenu>
        <menu idMso="FileSendMenu" enabled="false"/>
        <menu idMso="FileEmailAsPdfEmailAttachment" enabled="false"/>
        <menu idMso="FileEmailAsXpsEmailAttachment" enabled="false"/>
        <menu idMso="FileSendAsAttachment" enabled="false"/>
    </officeMenu>
</ribbon>

我无法弄清楚为什么我的架构无法正常工作.我对XML一无所知并没有帮助,我只是在这里摸索着摸索.我的目标是理想地删除(或至少禁用)Excel 2010中文件"菜单下的保存并发送"菜单项.我没有找到有关Office 2010的XML结构的任何文档,该文档似乎与Office 2007.

I canNOT figure out why my schema isn't working. It doesn't help that I know nothing about XML and I'm just kind of fumbling around in the dark here. My goal is to ideally remove (or at least disable) the "Save & Send" menu item under the File menu in Excel 2010. I am not finding any documentation on the XML structure for Office 2010, which seems to have changed significantly from Office 2007.

推荐答案

因此,在我问了这个问题之后,我当然找到了解决方案.这是删除文件"功能区下的各种项目的格式(在Office 2010中现在显然称为Backstage):

So of course right after I asked this question I found the solution. Here's the format to remove the various items under the File ribbon (what is now apparently called backstage in Office 2010):

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<backstage>
    <button idMso="FileSave" visible="false"/>
    <button idMso="FileSaveAs" visible="false"/>
    <button idMso="FileOpen" visible="false"/>
    <button idMso="FileClose" visible="false"/>
    <button idMso="ApplicationOptionsDialog" visible="false"/>
    <button idMso="FileExit" visible="false"/>
    <tab idMso="TabInfo" visible="false"/>
    <tab idMso="TabRecent" visible="false"/>
    <tab idMso="TabNew" visible="false"/>
    <tab idMso="TabPrint" visible="false"/>
    <tab idMso="TabShare" visible="false"/>
    <tab idMso="TabHelp" visible="false"/>
    </backstage>
</customUI>

这将删除文件"菜单下的所有选项.显然,您可以有选择地删除/显示想要的元素.

This will remove every option under the File menu. You can obviously selectively remove/show the elements you want to.

这篇关于删除“保存并删除"发送"使用自定义XML从Excel 2010中的“文件"菜单中选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆