The choice of TListView is a bit odd to me. You could have just as easily used a TListBox or TRichEdit component, which will give you an items: TStrings or lines: TStrings property, as well as LoadFromFile and SaveToFile methods.
You also need to check to make sure the user did actually choose a filename. The filename returned will always be the full path of the filename --there is no need to add '.txt' to it:
procedure TForm1.Button12Click(Sender: TObject);
begin
if savedialog1.Execute() then
ListBox.items.saveToFile(saveDialog1.fileName)
end;
If you only want to save, say, 250 lines at a time, you can do something like:
procedure save250( filename: string; var strs: tStrings; startAt: integer );
var
sl: tStringList;
b, e: integer;
begin
// Our temporary string list
sl := tStringList.create;
// indices of lines to copy, inclusive
b := startAt;
e := startAt + 249;
if e >= strs.count then e := strs.count -1;
// copy the indexed lines into our temporary string list
for b := b to e do
sl.append( strs[ b ] );
// save the lines to file
sl.saveToFile( filename );
// cleanup
sl.free
end;
Did you really want the caption saved at the beginning of each line?
Hope this helps.