2th import of a document returns a list index out of bounds

General TRichView support forum. Please post your questions here
Post Reply
E.Dijkshoorn
Posts: 3
Joined: Fri Oct 01, 2010 9:46 am

2th import of a document returns a list index out of bounds

Post by E.Dijkshoorn »

I have the following code :


The first time i use it al is wel and the document is converted and loaded, however if i try to load it a 2th time i get a list index out of bounds. I narowed it down to a table in the document. I think Richview holds some of the formats of the previous document.

How can i make sure all the settings are reset?


if FilterCounter > -1 then
begin
try
Succes := RVOfficeConverter.ImportRTF(F, FilterCounter);
except
Succes := False;
end;
if Succes then
begin
MyStream := TMemoryStream.Create;
MyStream.LoadFromStream(RVOfficeConverter.Stream);
RVOfficeConverter.Stream.Position := 0;

SRVE.RVHeader.Clear;
SRVE.RVFooter.Clear;
SRVE.RichViewEdit.Clear;

SRVE.RichViewEdit.LoadRTFFromStream(MyStream);

SRVE.RVHeader.Format;
SRVE.RVFooter.Format;
SRVE.SetRVMargins;
SRVE.Format;
MyStream.Free;
Break;
end;
end;
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

What version of ScaleRichView do you use?
If not the latest (3.6.1) please update it and check if this error still exists.
Post Reply