trichview.com

trichview.support




Re: Extracting headers and footers


Return to index


Author

Message

Sergey Tkachenko

Posted: 05/12/2003 19:56:32


procedure TForm3.RichViewEdit1SaveRTFExtra(Sender: TCustomRichView;

  Area: TRVRTFSaveArea; Obj: TObject; Index1, Index2: Integer;

  InStyleSheet: Boolean; var RTFCode: String);

begin

  if Area=rv_rtfs_Doc then

    RTFCode :=

     '{\header\pard\plain\posxc THIS IS HEADER WITH PAGENUMBER:

{\field{\*\fldinst PAGE}{\fldrslt 1}}\par}'+

     '{\footer\pard\plain\posxr THIS IS FOOTER\par}';

end;


In this example:

\posxc - keyword for aligning header/footer to center

\posxr - keyword for aligning header/footer to right

{\field{\*\fldinst PAGE}{\fldrslt 1}} - code for inserting page number







Powered by ABC Amber Outlook Express Converter