Delphi-Quellcode:
function RTF_To_Plain_Text(S : AnsiString) : string;
var
Stream : TMemoryStream;
RichEdit : TRichEdit;
begin
try
Stream := TMemoryStream.Create;
Stream.WriteBuffer(pointer(S)^ , length(S));
try
RichEdit := TRichEdit.CreateParented(HWND_MESSAGE);
RichEdit.Parent := nil;
RichEdit.PlainText := false;
RichEdit.WordWrap := false;
RichEdit.Visible := false;
Stream.Position := 0;
RichEdit.Lines.LoadFromStream(Stream);
Result := RichEdit.Lines.Text;
finally
RichEdit.Free;
end;
finally
Stream.Free;
end; end;
Also gelöst habe ich es so
Schönes Wochenende