none
How to make word document not editable outside of content control RRS feed

  • Question

  • Hi,

    I am using Word AddIn to  work on word document having a bunch of content controls .

    I want to restrict user not to insert anything outside of content controls , only user is allowed to edit inside content control .

    I tried by implementing restrict editing feature by c# code in  Addin, but the problem is track changes option got disabled .

    So I want if I can apply condition to make document non editable outside of content control , that can solve my problem

    Any suggestion ?

    Thanks in advance 

    Monday, July 1, 2019 2:33 PM

All replies

  • Hello Rasmi,

    VSTO doesn't provide anything for that. 

    You may consider using the Protect method of the Document class for preventing document changes.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Monday, July 1, 2019 4:09 PM
  • Hi Eugene,

    Protect method is disabling track change option in ribbon  , so I am searching for if  any other alternative that word can support through Addin code 

    Thanks 

    Thursday, July 4, 2019 7:02 AM
  • There is no other method available. You may track changes made on the document and revert them back. But I don't think it is a way to go.

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Thursday, July 4, 2019 10:55 AM