首先uses ShellAPI
其次在Button事件里面调用API函数ShellExecute
如:ShellExecute(Handle,'open',pchar('d:\报表.doc'),nil,nil,SW_MAXIMIZE);
function ShellExecute(hWnd: HWND; Operation, FileName, Parameters, Directory: PChar; ShowCmd: Integer): HINST; stdcall;
hWnd: 运行的窗口句拼;
Operation: 运行方式;
FileName: 文件及路径;
Parameters: 参数(一般程序没有);
Directory: 默认搜索路径;
ShowCmd: 当程序运行后的显示方式