none
create a readonly range or comment in word RRS feed

Answers

  • Then there's no code anyone can give you. There's no way in Word to make only Comments "read-only".
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by AmirSamani Wednesday, January 12, 2011 7:00 AM
    Tuesday, January 11, 2011 7:00 PM
    Moderator

All replies

  • The only way to make a comment "read-only" would also be to make the text to which it's linked read-only. Or, to put it another way, you'd have to apply some kind of document protection.
    Cindy Meister, VSTO/Word MVP
    Tuesday, January 11, 2011 4:30 PM
    Moderator
  • thanks cindy,but could you please give me code sample

    amir
    Tuesday, January 11, 2011 6:23 PM
  • A code sample for what, exactly?

    You need to be more specific about your requirements for the document and your interaction with the user. There's more than one kind of document protection, and what's available depends not only on your use-case but also on the version of Word you're targeting. You don't give us any of that information.

    About all I can tell you is that you might want to take a look at the Document.Protect method...


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by AmirSamani Tuesday, January 11, 2011 6:35 PM
    • Unmarked as answer by AmirSamani Tuesday, January 11, 2011 6:35 PM
    Tuesday, January 11, 2011 6:25 PM
    Moderator
  • thanks cindy,i use word 2003 and dsoframer control for hosting office document,i saw document.protect but it is not useful becuase all the document become readonly and i want to readonly part of document

    amir
    Tuesday, January 11, 2011 6:36 PM
  • Then there's no code anyone can give you. There's no way in Word to make only Comments "read-only".
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by AmirSamani Wednesday, January 12, 2011 7:00 AM
    Tuesday, January 11, 2011 7:00 PM
    Moderator
  • ok you mean that i can't readonly a range of text?

     


    amir
    Tuesday, January 11, 2011 7:23 PM
  • You can make a range of text read-only, but that means activating document protection. Read-only takes effect only when document protection is activated. If document protection won't work for you, then you can't use read-only.
    Cindy Meister, VSTO/Word MVP
    Wednesday, January 12, 2011 1:05 PM
    Moderator