Delphi擅長做數據庫類的MIS開發
最近接觸了一個用戶的案例
Delphi自帶了一個簡單的Word例題
啟動Word時用如下代碼
begin
try
Wordapplication
except
MessageDlg(
Abort;
end;
Wordapplication
WordApplication
end;
關閉Word用如下代碼
var
SaveChanges
begin
SaveChanges := WdDoNotSaveChanges;
OriginalFormat := UnAssigned;
RouteDocument := UnAssigned;
try
WordApplication
WordApplication
except
on E: Exception do
begin
Showmessage(E
WordApplication
end;
end;
end;
[
From:http://tw.wingwit.com/Article/program/Delphi/201311/24791.html