table content paste to MS Word error

General TRichView support forum. Please post your questions here
Post Reply
King Cheung
Posts: 12
Joined: Fri Mar 23, 2012 2:08 am

table content paste to MS Word error

Post by King Cheung »

When i copy a cell content and paste it to MS word, there will be added many empty line.
code to read the table content like this:

Code: Select all

      for j := 0 to RVData.ItemCount-1 do
          begin
            if (j>0) and RVData.IsFromNewLine(j) then
              xmlstr := xmlstr + #13#10;
            if RVData.GetItemStyle(j)=rvstab then
              xmlstr := xmlstr + #9
            else if RVData.GetItemStyle(j)>=0 then
             xmlstr := xmlstr + RVData.GetItemText(j);
          end;
code to load xml to table like this:

Code: Select all

      if teststr <> '' then
         begin
            table.Cells[r,c].GetRVData.Clear;
            table.Cells[r,c].GetRVData.AddNL(teststr,NewStyleNo,0);
          end;
     RichviewEdit.Format;
Sergey Tkachenko
Site Admin
Posts: 17561
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send a sample document (what is copied to MS Word incorrectly) to richviewgmailcom.
Post Reply