如何在MS-Word 2013中禁用“文件"按钮? [英] How to disable File button in MS-Word 2013?

查看:103
本文介绍了如何在MS-Word 2013中禁用“文件"按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要禁用文件"按钮. 例如,我有这段代码.

I want to disable File button. For example, I have this code.

<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"/>
        <button idMso="HistoryTab" visible="false"/>
        <button idMso="OfficeFeedback" visible="false"/>
        <button idMso="ShareDocument" 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"/>
        <tab idMso="TabPublish" visible="false"/>
        <tab idMso="TabSave" visible="false"/>
        <tab idMso="TabOfficeStart" visible="false"/>
    <tab idMso="Publish2Tab" visible="false"/>
    <tab idMso="TabOfficeFeedback" visible="false"/>
    </backstage>
</customUI>

此代码仅控制后台选项卡,而不控制文件"按钮. 我想直接控制文件按钮.

This code controls only the backstage tab, not the File button. I want to control the file button directly.

我认为最好的方法是保持文件按钮不可见.

The best way I think is to keep the file button invisible.

如何使用此方法控制文件"按钮? 还是有更好的方法?

How can I control File button using this method? Or is there a better way?

推荐答案

无法隐藏此按钮-这是设计使然.即使使用<ribbon startFromScratch="true">也不会将其隐藏.

It's not possible to hide this button - this is by design. Even using <ribbon startFromScratch="true"> won't hide it.

十多年前,当微软推出功能区时,我参加了几次会议.我记得,给出的原因是Office应用程序是授权给用户的最终用户工具.开发人员是客人".因此,用户应保留对其软件的某种最低限度的控制.这是对开发人员(和黑客)使用以前的用户界面(命令栏)劫持" Office应用程序的一种反应,将用户拒之门外.自从入门阶段以来,已经提供了使这些受保护"命令不可访问的更多可能性,但是最重要的命令不能被隐藏/删除.这样,用户至少可以识别出可能/应该存在命令(这在用户说它不起作用"时进行故障排除时很重要).

I sat in a few sessions back when Microsoft introduced the Ribbon, more than 10 years ago. As I recall, the reason given was that an Office application is an end-user tool, licensed to the user; developers are "guests". The user should therefore retain a certain, minimum control of their software. This was a reaction to developers (and hackers) "hijacking" Office applications using the previous user interface (command bars), locking users out. Since that introductory stage, more possibilities for making these "protected" commands inaccessible have been provided, but the most important ones cannot be hidden/removed. That way, the user can at least recognize that the commands could/should be present (which can be important when trouble-shooting when a user says "it's not working").

这篇关于如何在MS-Word 2013中禁用“文件"按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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