I'm not sure if the latest release of ExtraDevices has this functionality built in. The ReportBuilder server uses the Windows API call ShellExecute to automatically open newly created files. Check out the ShellExecute topic in the Windows SDK help for more information. You will want to create a method similar to the one below...
uses Windows, SysUtils;
function TForm1.ShellExec(const aPathStr, aCmdStr, aDirStr: string; aShow: Word): Boolean; var lhInst: THandle; lpOperation: array[0..5] of Char; begin
Comments
I'm not sure if the latest release of ExtraDevices has this functionality
built in. The ReportBuilder server uses the Windows API call ShellExecute
to automatically open newly created files. Check out the ShellExecute topic
in the Windows SDK help for more information. You will want to create a
method similar to the one below...
uses
Windows,
SysUtils;
function TForm1.ShellExec(const aPathStr, aCmdStr, aDirStr: string; aShow:
Word): Boolean;
var
lhInst: THandle;
lpOperation: array[0..5] of Char;
begin
StrPCopy(lpOperation, 'open');
lhInst := ShellExecute(0, lpOperation, PChar(aPathStr), PChar(aCmdStr),
PChar(aDirStr), aShow);
{ If 32 or less, an error occurred }
Result := (lhInst > 32);
end;
and call it like so...
ShellExec(FileName, '', ExtractFilePath(FileName), SW_SHOWNORMAL);
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com