先放一个WordApplication,WordDocument控件在表单上.
//zhangkan 的方法,我试过的,可以。
procedure OpenWordFile(FileName:String);
var
a:OleVariant;
begin
a:=FileName;
WordApplication1.Connect;
WordApplication1.Visible:=true;
WordDocument1.Connectto(WordApplication1.Documents.Open(a,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam));
//如果不行,上面改为下面;
// WordDocument1.Connectto(WordApplication1.Documents.Open(a,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam));
end;