none
How to Disable out of box 'Save' or 'Save As' button in ribbon in Word 2010 addin project programatically? RRS feed

  • Question

  • I have a Visual Studio 2010 Word addin project. I want to disable the 'Save'  button programatically.

    How can I do it?


    Tuesday, January 10, 2012 10:42 AM

Answers

All replies

  • Hello,

    You need to repurpose the built-in Ribbon command, IdMso="FileSave". Find details in Temporarily Repurpose Commands on the Office Fluent Ribbon.


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Tuesday, January 10, 2012 10:49 AM
  • Oh, the Save As button corresponds to IdMso="FileSaveAs".
    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Tuesday, January 10, 2012 10:51 AM
  • Hi Andrei ,

    I am not using the Ribbon(XML). I am using the Ribbon (Visual Designer).

    Thanks !


    Amol C kadam
    Tuesday, January 10, 2012 11:04 AM
  • Hi Amol,

    You cannot do this with the Ribbon designer. Here's a citation from How to: Export a Ribbon from the Ribbon Designer to Ribbon XML:

    The Ribbon (Visual Designer) item does not support all possible types of Ribbon customization. To customize the Ribbon in advanced ways, you can export the Ribbon from the designer to Ribbon XML and edit the XML directly.

     


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Tuesday, January 10, 2012 12:16 PM
  • Hi Amol,

    Maybe this thread will help. I have not tried it, so beyond providing the link I can't give you any first hand experience.


    Kind Regards, Rich ... http://greatcirclelearning.com
    Tuesday, January 10, 2012 12:18 PM
  • Hi Rich,

    I have tried this.

     But when I run the the addin project, and after I clicks the 'File' Menu, I see that the 'Save' or 'SaveAs' button is not disabled.

    I want to disable the 'Save' or 'SaveAs' button as the addin project  loads..

    Thanks & Regards,


    Amol C kadam

     


    Thursday, January 12, 2012 6:10 AM
  • Hi Amol,

     

    Thanks for posting in the MSDN Forum.

     

    What you want disable is in the backstage of the Office 2010. So I would recommend you follow the article of http://msdn.microsoft.com/en-us/library/ee815851.aspx to handle your issue. And the idMso is “FileSaveAs” like Andrei told you.

     

    @Andrei & Rich,

     

    Thanks for your great work.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Friday, January 13, 2012 5:43 AM
    Moderator
  • I would like to repurpose the isMso="FileSave", followed the same steps given in the article. When I click Save button on my Word 2010, the default SaveAS window is coming, after closing but clicking on Cancel button my custome window is coming up. Is there is anyway my custom window shows up when ever the user clicks on Save button? 

    Our requirement when the Save button repurposed, the documents needs to be saved into our custom application. I need to display my custom save window instead of the default saveas window.

    Thanks,

    Badri

    Friday, April 27, 2012 6:53 PM