merge table rows

General TRichView support forum. Please post your questions here
Post Reply
Posts: 3
Joined: Wed May 08, 2019 11:44 am

merge table rows

Post by vector »


I have a rtf document opened in richchedit, with two tables.
How can i insert the second table 3. row into first table 9. row?
Please help me. The structure of the tables is unknow, because it made by user.

Thank you!
Sergey Tkachenko
Site Admin
Posts: 15786
Joined: Sat Aug 27, 2005 10:28 am

Re: merge table rows

Post by Sergey Tkachenko »

Code: Select all

  Stream: TMemoryStream;

  Stream := TMemoryStream.Create;
  table2.SaveRowsToStream(Stream, 9, 1);
  Stream.Position := 0;
  table2.LoadFromStreamEx(3, 0, False);
This code works if tables are in the same editor.
If rows are incompatible, LoadFromStreamEx raises an exception.
Post Reply