在Delphi6中打开一个Word 的模版?(100分)

  • 主题发起人 主题发起人 mylove__47
  • 开始时间 开始时间
M

mylove__47

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大哥请帮小弟打开一个Word的模版文件?(在Delphi 6 中)
 
procedure TForm1.Open1Click(Sender: TObject);
var
filename, confirmconversions, readonly, addtorecentfiles,
passworddocument, passwordtemplate, revert,
writepassworddocument, writepasswordtemplate, format, Encoding, Visible: olevariant;
begin
wordapplication1.Connect;
wordapplication1.Visible := true;
if opendialog1.Execute then
begin
filename := opendialog1.FileName;
confirmconversions := false;
readonly := false;
addtorecentfiles := false;
passworddocument := '';
passwordtemplate := '';
revert := true;
writepassworddocument :='';//文档密码
writepasswordtemplate := '';//模板密码
format := wdOpenFormatAuto;
encoding := '';
visible := true;
wordapplication1.Documents.Open(filename, confirmconversions, readonly,
addtorecentfiles, passworddocument, passwordtemplate, revert,
writepassworddocument, writepasswordtemplate, format, encoding, visible);
end
else
exit
end;
 
接受答案了.
 
后退
顶部