trichview.com

trichview.support.examples




Re: Transform Text Code from RVF type to RTF.


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/24/2004 12:52:07


Something like this:


procedure ExportTable(Source, Dest: TDataSet;

  const SourceFieldName, DestFieldName: String; rv: TCustomRichView);

var Stream: TStream;

begin

  Source.First;

  while not Source.Eof do begin


    Stream := Source.CreateBlobStream(Source.FieldByName(SourceFieldName),

bmRead);

    rv.LoadRVFFromStream(Stream);

    Stream.Free;


    Dest.Append;

    Stream := Dest.CreateBlobStream(Dest.FieldByName(DestFieldName),

bmWrite);

    rv.SaveRTFToStream(Stream, False);

    Stream.Free;

    Dest.Post;


    Source.Next;

  end;

end;





Powered by ABC Amber Outlook Express Converter