Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- ExecInfo: TShellExecuteInfo;
- begin
- if FileExists(ExtractFilePath(ParamStr(0))+'document.doc') then begin
- ZeroMemory(@ExecInfo, sizeof(ExecInfo));
- with ExecInfo do
- begin
- cbSize := sizeOf(ExecInfo);
- fMask := SEE_MASK_NOCLOSEPROCESS;
- lpVerb := PChar('open');
- lpFile := pchar(ExtractFilePath(ParamStr(0))+'document.doc');
- nShow := 1;
- end;
- ShellExecuteEx(@ExecInfo);
- if ExecInfo.hInstApp<32
- then WaitForInputIdle(ExecInfo.hProcess, 10000) end else
- ShowMessage('Файл отсутствует!');
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement