[AccessD] With Events? Detect When a Printer Has Completed?

Max Wanadoo max.wanadoo at gmail.com
Mon May 11 14:47:31 CDT 2009


Dan,
I have just pulled this bit of code out which shows how I was using it.
It is referring to a word object

    If lngQueuePID > 0 Then
      .ActiveDocument.SaveAs strSaveNamePath
      .Options.PrintBackground = True
      '.ActiveDocument.PrintOut
      ActiveDocument.PrintOut Background:=False
      ' keep here until document is printed
      Do While .BackgroundPrintingStatus > 0
        StatusBar = .BackgroundPrintingStatus & " print jobs are queued up"
        MsgBox .BackgroundPrintingStatus & " print jobs have been sent to
your default printer"
        DoEvents
      Loop
      .ActiveDocument.Close
      .Quit
    Else
      .ActiveDocument.SaveAs strSaveNamePath
      '.PrintOut Background
      .Visible = True
      .Activate
    End If
  End With

You may be able to pick the bones out of this.

Max



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: 11 May 2009 20:34
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] With Events? Detect When a Printer Has Completed?

I need to be able to detect when a printer has completed a print job from
the current PC.  Does anyone have a reference where I can look this up?

This sounds suspiciously like a WithEvents solution! ;-)

Thanks!
Dan





-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list