CliffClimber
Technical User
Hi,
the following code calls the windows save dialog and works just fine, but I wish to specify (no options) where the file is saved. i have read all I can find about SaveFile but can't figure out how to implement it.
Thanks,
Cliff
the following code calls the windows save dialog and works just fine, but I wish to specify (no options) where the file is saved. i have read all I can find about SaveFile but can't figure out how to implement it.
Thanks,
Cliff
Code:
procedure TFormMain.ButtonSaveClick(Sender: TObject);
var
TxtFile: TStringList;
Txt : String;
begin
CreatePrintHtml;
LoadPrintHtml;
//The following names the saved file with the ADDRESS
//as the file name if it exists, if not the file is
//saved using the PARCEL code.
if MainData.FieldByName('STREETNO').AsString = '' then begin
SaveDialog1.FileName := MainData.FieldByName('PARCEL').AsString;
end else begin
SaveDialog1.FileName := MainData.FieldByName('STREETNO').AsString+' '+
MainData.FieldByName('STREETDIR').AsString+' '+
MainData.FieldByName('STREETNAME').AsString;
end;
[endcode]