Code: Select all
begin
rveDoc.RVHeader.SetSelectionBounds(
0, rveDoc.RVHeader.GetOffsBeforeItem(0),
0, rveDoc.RVHeader.GetOffsBeforeItem(0));
while (rveDoc.RVHeader.SearchText(InSearch,[RVEdit.TRVESearchOption.rvseoMatchCase,
RVEdit.TRVESearchOption.rvseoDown])) do
rveDoc.RVHeader.InsertText(InReplace, False);
end;
begin
rveDoc.ActiveEditor.SetSelectionBounds(
0, rveDoc.ActiveEditor.GetOffsBeforeItem(0),
0, rveDoc.ActiveEditor.GetOffsBeforeItem(0));
while (rveDoc.ActiveEditor.SearchText(InSearch,[RVEdit.TRVESearchOption.rvseoMatchCase,
RVEdit.TRVESearchOption.rvseoDown])) do
rveDoc.ActiveEditor.InsertText(InReplace, False);
end;
List Index out of bounds (0) but not on the first time thru. 32nd time thru the searchandreplace it errors out. InSearch = '<HKL_01>' and InReplace = 'HKL, LLP'