I set up a mock up form with just a richedit and a button on it. The code below may not the best way to achive this, but it works with Word 2007 on Win XP.
uses Word_TLB;
procedure TForm1.Button1Click(Sender: TObject);
var
wordApp : _Application;
doc : WordDocument;
table : Word_TLB.Table;
filename : OleVariant;
aRange : Range;
aWdUnits : OleVariant;
count : OleVariant;
begin
//need to back up 2 characters from range object to exclude table border.
//Remove 1 character only if using selection
count := -2;
aWdUnits := wdCharacter;
filename := '"H:\Documents and Settings\HH\My Documents\testing.docx"';
RichEdit1.Clear;
try
wordApp := CoWordApplication.Create;
wordApp.visible := False;
doc := wordApp.documents.open( filename, emptyparam,emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam );
table := doc.tables.item(1);
aRange := table.cell(3,1).Range;
aRange.MoveEnd(aWdUnits, count); //This is needed so border is not included
aRange.Copy;
RichEdit1.PasteFromClipboard;
RichEdit1.Lines.Add('');
finally
wordApp.quit(EmptyParam, EmptyParam, EmptyParam);
end;
end;
And, this is the result:
.
The only thing is the multiline text appeared as a single line in the richedit.