Just tried to implement undo for OfficeConverters file import.
I want to import several .doc files and create undo point after each import but this seems not working:
r:=RVOfficeConverter1.ImportRTF(OpenDialog1.FileName, OpenDialog1.FilterIndex);
if r then begin
RVOfficeConverter1.Stream.Position := 0;
RichViewEdit1.InsertRTFFromStream(RVOfficeConverter1.Stream);
end;
r:=RVOfficeConverter1.ImportRTF(OpenDialog1.FileName, OpenDialog1.FilterIndex);
if r then begin
RVOfficeConverter1.Stream.Position := 0;
RichViewEdit1.SelectAll;
RichViewEdit1.InsertRTFFromStream(RVOfficeConverter1.Stream);
end;
r:=RVOfficeConverter1.ImportRTF(OpenDialog1.FileName, OpenDialog1.FilterIndex);
if r then begin
RVOfficeConverter1.Stream.Position := 0;
ItemNo := RichViewEdit1.ItemCount-1;
RichViewEdit1.SetSelectionBounds(
ItemNo, RichViewEdit1.GetOffsAfterItem(ItemNo),
ItemNo, RichViewEdit1.GetOffsAfterItem(ItemNo));
RichViewEdit1.InsertRTFFromStream(RVOfficeConverter1.Stream);
end;