locked
Office backstage (File) tab invisible or disabled RRS feed

  • Question

  • I need to make the Office (Word actually) File Tab either invisible or disabled. I tried using the onShow event (CustomUI14) and cancelling the action (VBA) by using SendKeys("{ECS}"), but this is not reliable enough (sometimes it works, sometimes not). I have not found anything in Interop (c#) that would do this. Can anyone help?
    Monday, December 13, 2010 8:32 PM

Answers

  • I'll stick to my solution for now. But I can't believe that there is absolutely no way to do this. It would be illogical for the Microsoft people to let you customize this tab to the point of having nothing left on it (giving you a poorly designed solution), but not be able to make the tab invisible or disabled (proper programming) ... I'm sure that there is a way to do this. Microsoft, please share the info.


    Hi JoeBobPete

    Actually, this was a conscious design decision on the part of the Microsoft team that designed the Ribbon UI. I happened to be at a couple of meetings where the new philosophy was presented, back in 2006/2007 and the reasoning, as I recall, went something like this:

    1. The Office applications are licensed to the user and belong to the user.

    2. The Developer using Office in his solution is a "guest"; the Developer does not pay any license fees and has no rights to the Office applications installed on users' machines. The Developer should not be able to lock the user out of certain, key commands that control the application.

    3. All these key commands are located in the File menu (Office button's menu in 2007). They include the ability to unload any third-party add-in and the ability to quit the application.

    4. The "why" behind this is not a single reason, but includes (a) experience with "rude" third-party applications that "broke" built-in functionality, did not tell the user they were doing this (and not Microsoft) and could not be easily traced or removed; (b) Developers selling products that used Office applications but presented them as their own (Microsoft essentially not getting credit for functionality).

    Therefore, this menu cannot be removed or disabled. Certain commands it contains can be, but not all.


    Cindy Meister, VSTO/Word MVP
    • Proposed as answer by Mauro Castagnasso Monday, December 20, 2010 9:06 PM
    • Marked as answer by Bessie Zhao Tuesday, December 21, 2010 9:35 AM
    Thursday, December 16, 2010 7:37 AM

All replies

  • Hi,

    I'm afraid that is not possible to hide the Office button / File tab. All you can do is hide the buttons that it contains.

    Regards,

    Mauro


    castagnasso.wordpress.com | If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Tuesday, December 14, 2010 2:07 PM
  • Thanks Mauro,

    I'll stick to my solution for now. But I can't believe that there is absolutely no way to do this. It would be illogical for the Microsoft people to let you customize this tab to the point of having nothing left on it (giving you a poorly designed solution), but not be able to make the tab invisible or disabled (proper programming) ... I'm sure that there is a way to do this. Microsoft, please share the info.

    JoeBobPete  


    JoeBobPete
    Wednesday, December 15, 2010 7:54 PM
  • Hi,

    I think is not possible by design, but I'm not part of the VSTO team; here is a thread with the same question (is a common one): http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/fe93a0d5-0b92-45a7-b39d-f4a5437de1db.

    Regards,

    Mauro.

     


    castagnasso.wordpress.com | If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Wednesday, December 15, 2010 8:25 PM
  • I'll stick to my solution for now. But I can't believe that there is absolutely no way to do this. It would be illogical for the Microsoft people to let you customize this tab to the point of having nothing left on it (giving you a poorly designed solution), but not be able to make the tab invisible or disabled (proper programming) ... I'm sure that there is a way to do this. Microsoft, please share the info.


    Hi JoeBobPete

    Actually, this was a conscious design decision on the part of the Microsoft team that designed the Ribbon UI. I happened to be at a couple of meetings where the new philosophy was presented, back in 2006/2007 and the reasoning, as I recall, went something like this:

    1. The Office applications are licensed to the user and belong to the user.

    2. The Developer using Office in his solution is a "guest"; the Developer does not pay any license fees and has no rights to the Office applications installed on users' machines. The Developer should not be able to lock the user out of certain, key commands that control the application.

    3. All these key commands are located in the File menu (Office button's menu in 2007). They include the ability to unload any third-party add-in and the ability to quit the application.

    4. The "why" behind this is not a single reason, but includes (a) experience with "rude" third-party applications that "broke" built-in functionality, did not tell the user they were doing this (and not Microsoft) and could not be easily traced or removed; (b) Developers selling products that used Office applications but presented them as their own (Microsoft essentially not getting credit for functionality).

    Therefore, this menu cannot be removed or disabled. Certain commands it contains can be, but not all.


    Cindy Meister, VSTO/Word MVP
    • Proposed as answer by Mauro Castagnasso Monday, December 20, 2010 9:06 PM
    • Marked as answer by Bessie Zhao Tuesday, December 21, 2010 9:35 AM
    Thursday, December 16, 2010 7:37 AM
  • Hi Cindy,

    Thank you for your answer. Just a few quick comments if I may.  

    We are developing an in-house application and everyone here, developers and users, has a fully licensed Office 2010 [over 200 000$ worth]. We don't feel that we are over-extending our 'guest' privileges by using the developer tools made available.

    Since the ribbon and backstage customization is now document specific, the problem of 'breaking' the user's application is now irrelevant.

    Yes, all the commands on the tab can be made invisible. Therefore. it is still not logical to allow us to make everything on the tab invisible, but not the tab itself.

    It is unfortunate that Microsoft chooses to limits serious developers because of others with questionnable ethics.

    Once again, thank you. I appreciate that you took the time to answer my posting.


    JoeBobPete
    Thursday, December 23, 2010 4:57 PM
  • Hi JoeBobPete

    <<Just a few quick comments if I may>>

    You may, but I'm not a Microsoft employee... :-)

    <<Since the ribbon and backstage customization is now document specific>>

    No more so than toolbars were. They can be document, template and also Add-in specific. The problem has always been with add-ins, not toolbars in documents.


    Cindy Meister, VSTO/Word MVP
    Thursday, December 23, 2010 5:14 PM