Create and Delete protected paragraphs in code

  • Delphi 5, WP Tools 5.39 (yes, 5.44 is better - I will update), Windows XP.

    Hello,

    My application uses WP Tools for simple stuff - display and user editing of text. So, I don't use WP Tools features extensively. The side-effect: I get stuck on simple stuff. Here is another one of those. On the good side, I don't bother Julian except, may be, once a year.

    Issue: Our users select a template as starting point for their document. They can freely edit this document (type, paste, dictate into). I need to add "Advisory" paragraphs in templates. Users can not delete/edit "Advisory" paragraphs (protected text). Before saving text, applications deletes "Advisory" paragaphs.

    This is what I need:
    1. When creating templates: Code for button click event which makes the active paragraph "protected" and sets a different color/font for whole para.

    2. When saving edited document (this still has protected "Advisory" paras in it) - identify and remove protected paras.

    I have searched forums and found quite a few posts but none offering a clear solution to what I am looking for (compounded by my limited understand of internals of WP Tools).

    Please provided guidance including sample code how best to approach the above issue.

    Thank You very much


    JayM

    PS: WP Tools is a great product and great support too. It has been very stable in our application - can't ask for more. THANKS.