//uses Word2000, ComObj;
//WordApp: TWordApplication;
//WordDoc: TWordDocument;
procedure TfrmDetails.btnExportClick(Sender: TObject); //单击“导出“按钮
var
V:Variant;
Template,NewTemplate,DocumentType,Visible:OleVariant;
itemIndex:OleVariant;
fileName:Olevariant;
NoPrompt,OriginalFormat:OleVariant;
RouteDocument,SaveChanges:OleVariant;
begin
//指定文档的路径和文件名
fileName:=’C:\LogAdmin\doc\’+’值班日志’+Trim(DBTextID.Caption)+’.doc’;
//如果该日志的对应Word文档已经存在则提示是否覆盖
if FileExists(fileName)=true then
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/