I work with Delphi 2009 on a 64-bit Windows 8 computer and I found that TDBRichEdit and TRichEdit (containing rich text) exhibit a strange and unexpected behaviour when, for instance, I do:
RichEdit1.SelectAll;
RichEdit1.CopyToClipboard;
RichEdit2.PasteFromClipboard;
Surprisingly, this process appends a new line (a paragraph mark + formatting codes) to the content of RichEdit2.
If, using OLE Automation, I do
RichEdit1.SelectAll;
RichEdit1.CopyToClipboard;
WordDoc.Content.Paste;
... do something with Word...
WordDoc.Content.Paste;
RichEdit2.PasteFromClipboard;
then two lines (a paragraph mark + a paragraph mark + formating codes) are appended to the content of RichEdit2.
Why does this happen? Is it a bug of some sort?