Protect Header and Footer from the "users"

  • Hi everyone,

    How could I protetct the header and footer sections from a document?

    The user is only allowed to write in the body of a letter, and I want to avoid that he/she changes them (header and footer).

    Besides, I also would like to protect the vertical and horizaontal rules... how could I implement this?

    Any help will be welcome. Thanks in advance.

    Regards.

  • Hi,

    1. You may use EditOptionsEx [wpDisableEditOfNonBodyDataBlocks]

    2. What do you mean about 'to protect the vertical / horizontal rules'? Avoid the user to scroll? If so, just hide the scroll bars with ScrollBars := ssNone

    Hope this helps

    Alessandro Fragnani

  • First of all, I would like to thank you both of you for your help. The solution of avoiding to edit header & footer is ready.

    I guess, I did not explain myself correctly about the Rulers.

    I do have a certain value for the Top and the Bottom margins of my document; nevertheless the user can move this settings in the vertical ruler and so, the original settings too.

    How could I avoid to modify the Top and Bottom margins with the Vertical ruler?

    Once again, thanks a lot!

    Regards.

  • Hi,

    You may use TWPRulerOptions to solve this, in each Ruller assigned to the WPRichText.

    Code
    TWPRulerOptions = set of (
        wrShowTabSelector,
        wrShowTabStops,
        wrShowIndents,
        wpUseIntervalls,
        wpNoVertRulerAttached, // should be enabled when you use a vertical ruler
        wpRulerReadOnly, // Don't allow draging of indent merkers
        wpPageMarginsReadOnly // Do not change margins of the page
        );

    Hope this helps

    Alessandro Fragnani