IPrintJobAdditionalOperations Method: Cancel

Cancel ();

Description
Removes the specified print job from the print queue.

Remarks
The user must have administrative privileges on the print queue to use this method.

Example

Dim PrintQueueOperations As IADsPrintQueueOperations
Dim PrintJobAdditionalOperations As IPrintJobAdditionalOperations
'Get the IADsPrintQueueOperations interface. In the path HP DeskJet '500C is the print queue.
Set PrintQueueOperations = GetObject ("NTDS://MSFT/MOON/HP DeskJet 500C")
'Enumerate individual, print jobs and cancel them
For each PrintJobAdditionalOperations In PrintQueueOperations.PrintJobs
PrintJobAdditionalOperations.Cancel
Next PrintJobAdditionalOperati
ons 

 

See Also