Here's a little script that will let you know if there are print jobs in the
queue:
strComputer = "."
WSHShell = CreateObject("WScript.Shell")
objWMIService = GetObject("winmgmts:" +
"{impersonationLevel=impersonate}!\\" + strComputer + "\root\cimv2")
colPrintJobs = objWMIService.ExecQuery("SELECT * FROM Win32_PrintJob")
?"Print Queue, Job ID, Owner, Total Pages"
For Each objPrintJob in colPrintJobs
?objPrintJob.Name+' '+TRANSFORM(objPrintJob.JobID )+", " + objPrintJob.Owner
+ ", " + TRANSFORM(objPrintJob.TotalPages)
Next
John Harvey
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Michael Madigan
Sent: Thursday, August 24, 2006 5:51 PM
To: ProFox Email List
Subject: Re: Printing a series of PDFs from VFP
I've had the same problem of acrobat hanging around.
I haven't figured out how to kill it either.
--- Dan Olsson <[EMAIL PROTECTED]> wrote:
> Anyone know a GOOD way to achieve that? Preferrably
> a windows
> (DLL,FLL) way, but even a DOS command line tool is
> OK.
>
> Using ShellExecute with the "print" option is not
> good enough,
> because Adobe Reader does not close itself
> afterwards and killing the
> process isn't an option since I have no way (that I
> know of) to know
> WHEN it actually has finished the spool job.
>
> ******************************
> * Dan Olsson
> * <mailto:[EMAIL PROTECTED]>
> * <http://www.dolittle.se>
>
>
>
> _______________________________________________
> 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.
>
[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.