Page 1 of 1

table content paste to MS Word error

Posted: Sun Apr 01, 2012 5:03 am
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;

Posted: Thu Apr 05, 2012 4:31 pm
by Sergey Tkachenko
Please send a sample document (what is copied to MS Word incorrectly) to richviewgmailcom.