Cancel all printer jobs
From: gokcey (gokcey.128gik_at_mail.mcse.ms)
Date: 02/26/04
- Next message: Fernando Daffara: "Re: Network Printers keep unmapping itself?"
- Previous message: Martin Simmons: "Job canceled when out of paper"
- Next in thread: Felix Maxa [MSFT]: "Re: Cancel all printer jobs"
- Reply: Felix Maxa [MSFT]: "Re: Cancel all printer jobs"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 26 Feb 2004 05:23:34 -0600
Hi,
My computer's operating system is Windows 2000. I need to cancel all
jobs on
printer. For this reason I have written a script code below:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _ &
"{impersonationLevel=imper
sonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_PrinterConfiguration")
For Each objPrinter in colInstalledPrinters
If objPrinter.Name = "Xerox DocuPrint N2125" Then
objPrinter.CancelAllJobs()
End If
Wscript.Echo "Name: " & objPrinter.Name
Next
However, When I run this script, I get an error like below:
Microsoft VBScript runtime error: Object doesn't support this
property
or method: 'objPrinter.CancelAllJobs'
Is this because the operating system is Windows 2000.
What can I do to cancel all jobs in my printer using code?
Thanks in advance.
-- gokcey ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message427844.html
- Next message: Fernando Daffara: "Re: Network Printers keep unmapping itself?"
- Previous message: Martin Simmons: "Job canceled when out of paper"
- Next in thread: Felix Maxa [MSFT]: "Re: Cancel all printer jobs"
- Reply: Felix Maxa [MSFT]: "Re: Cancel all printer jobs"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|