|
|
Gets the name of the document that this print job was created from
[Visual Basic] Public Property Document As String [C#] public string Document {get;set}
Set to the name of the document from which this print job was created
Throws an InsufficentPrintJobAccessRightsException if set and the logged in user does not have sufficient privilege to alter this print job
[Visual Basic] The following example changes the document name when it is added
[Visual Basic] Private mPr As PrinterMonitorComponent Public Sub StartWatching(ByVal PrinterDeviceName As String) mPr = New PrinterMonitorComponent() AddHandler mPr.JobAdded, AddressOf Addedtest mPr.ThreadTimeout = -1 mPr.DeviceName = PrinterDeviceName End Sub Public Sub Addedtest(ByVal sender As Object, ByVal e As EventArgs) With CType(e, PrintJobEventArgs).PrintJob If .Document = "CV.doc" Then Try .Document = "Not a CV.doc" Catch ej As PrinterQueueWatch.PrinterMonitoringExceptions.InsufficentPrintJobAccessRightsException Debug.Write("You cannot change this print job") End Try End With End Sub
Namespace: PrinterQueueWatch
Platforms: Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
PrintJob overview , All PrintJob members