Header and Footer config

  • Thanks Julian! It worked!! But, only when the document have more than one page. When the document have just one page, the footer dosen't show. How can I fix this??

    Thanks

    EDIT:

    The code below seems to wrk. But, in wich event I should call it for better performance??

    Code
    WPRichText1.HeaderFooter.Get(wpIsHeader, wpraOnAllPages,'').RTFText.AsString := 'Header On All Pages';
       if WPRichText1.PageCount > 1 then
       begin
          WPRichText1.HeaderFooter.Get(wpIsFooter, wpraOnFirstPage,'').RTFText.AsString := '';
          WPRichText1.HeaderFooter.Get(wpIsFooter, wpraOnLastPage,'').RTFText.AsString  := 'Footer On Last Page';
       end
       else WPRichText1.HeaderFooter.Get(wpIsFooter, wpraOnFirstPage,'').RTFText.AsString := 'Footer On Last Page';
  • Thanks Julian!! I used the code below and it's working very well! If you think that it's not okay or there is a better solution, please tell me!


    Thanks again!!