none
Is it possible to Enable the Track Changes ribbon button in Word 2007/2010 with document Protection turned on? RRS feed

  • Question

  • We have an application for which our add-in controls document level protection, but we would like to allow users to turn change tracking on/off, regardless of the document state.  Ideally, I would like to have the Track Changes button always enabled, and then handle removing/re-adding the protection in the event handler.  I have added the following to the ribbon .xml:

    <command idMso="ReviewTrackChanges" getEnabled="GetEnabledEventHandler" onAction="MenuToggleEventHandler"/>

    The enabled handler is returning true, and the on action event is firing; however, if the document is protected, the button is still not enabled.  Is there a way to accomplish enabling the button if the document protection is turned on?  Or possibliy, is there a variation of the document protect via parameters to enable the button?

    Thank you,

    - James

    Tuesday, February 7, 2012 4:17 PM

Answers

  • Hi James

    I think you'd need to create your own button for this. There's no way "around" most document protection (you don't specify which kind you're using) for most of the object model. And if Word locks out functionality due to protection there's no way for you to enable it or the related command interfaces (a built-in button, for example).


    Cindy Meister, VSTO/Word MVP

    Tuesday, February 7, 2012 6:25 PM
    Moderator