The last post was a little screwed up. Outlook mangled the cut and past,
sorry

****************
* Start Code
*
DECLARE INTEGER ShellExecute IN Shell32.DLL ;
        INTEGER nWinHandle,;
        STRING cOperation,;   
        STRING cFileName,;
        STRING cParameters,;
        STRING cDirectory,;
        INTEGER nShowWindow

ShellExec("test.pdf","","c:\temp\")
Return

*********
* UDF API Call
PROCEDURE ShellExec (exeName, exeParms, exePath) LOCAL nStat, errorDesc 

  cOperation="print"   && Use "open" to view
  nStat = ShellExecute(0,cOperation,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
*
* End of Code
****************** 


Dave Crozier
 The secret to staying young is to live honestly, eat slowly, and to lie
about your age 

 


Dave Crozier
 The secret to staying young is to live honestly, eat slowly, and to lie
about your age 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of John Weller
Sent: 11 October 2006 16:25
To: [email protected]
Subject: Printing PDFs Using VFP

My client wants me to print PDF files from VFP.  I looked in the archives
and found an email from Desmond Lloyd dated 2003 asking much the same
question but couldn't find a reply that answered his question.

Basically, he will be sent a series of reports in PDF format which then have
to be printed out.  The obvious solution would be to have someone open each
file in turn using Acrobat Reader, press Print then move the file to a
separate directory however the quantities involved preclude that.  What he
really wants is something which can be pointed to a folder of files which
will print each one in turn and create some sort of log automatically which
looks as though it would need some sort of automation similar to Word.  Does
such a capability exist?

TIA

John Weller
Wessex Computer Solutions
01380 728880
07976 393631



[excessive quoting removed by server]

_______________________________________________
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
** 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.

Reply via email to