procedure TFrm_ZhiZu.suiBtnSaveReportClick(Sender: TObject);
var
Visible, Template, NewTemplate, DocuType: OleVariant;
strFileName: OleVariant;
byteRowCount, byteColCount: OleVariant;
i, j: integer;
Index: OleVariant;
strTemp: OleVariant;
blSaveChange: OleVariant;
begin
if ListView1.Items.count = 0 then
begin
Beep;
Exit;
end;
strFileName := '';
SaveDialog1.Filter := 'Word 文档|*.doc';
if SaveDialog1.Execute then
begin
strFileName := SaveDialog1.FileName;
end
else
begin
Beep;
Exit;
end;
//
if ExtractFileExt(strFileName) <> '.doc' then
begin
strFileName := strFileName + '.doc';
end;
//
if FileExists(strFileName) then
begin
if MessageBox(Application.handle, '文件已存在,要替换吗?', 'Attention!', MB_YESNO)
= ID_NO then
begin
Exit;
end;
end;
//
suiBtnWait.Caption := '正在保存数据..., 请稍候.';
suiBtnWait.Left := (Self.Width - suiBtnWait.Width) div 2;
suiBtnWait.Top := (Self.Height - suiBtnWait.Height) div 2;