On Jan 3, 2008 4:26 PM, Dave Crozier wrote:
> * API Call to print out or OPEN a document
>
> Declare Integer ShellExecute In Shell32.Dll ;
> INTEGER nWinHandle,;
> STRING cOperation,;
> STRING cFileName,;
> STRING cParameters,;
> STRING cDirectory,;
> INTEGER nShowWindow
>
> ShellExec("test.pdf","","c:\temp\")
>
> *********
> Procedure ShellExec (exeName, exeParms, exePath)
> Local nStat, errorDesc
>
> * Use the next line to View
> * nStat = ShellExecute(0,"open",exeName,exeParms,exePath,1)
>
> * Use the next line to Print
> nStat = ShellExecute(0,"print",exeName,exeParms,exePath,1)
>
> * If nStat > 32, then it is the Instance Handle
> * To get a Windows Handle see support.microsoft.com/kb/q242308/
> If nStat <= 32
> errorDesc = Icase(nStat=2,"Invalid path or filename", ;
> nStat=8,"Insufficient memory", ;
> nStat=11,"invalid EXE file", ;
> nStat=31,"Invalid action, or no application
> associated with the specified file", ;
> "Error description not available")
> Messagebox("Error "+Ltrim(Str(nStat))+" ...
> "+errorDesc,16,"Program did not start.",2000)
> Endif
>
> Return
>
> Dave Crozier
Hi Dave,
Hope this email finds you well.
Sorry to trouble you, but can you explain what lcase means?:
> errorDesc = Icase(nStat=2,"Invalid path or filename", ;
Cheers,
Garry
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.