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

Dan Waters dwaters at usinternet.com
Mon May 11 15:23:04 CDT 2009


Hi Max,

Well - this is specific to Word when that doc has been printed.

My App might print any file using ShellExecute.  I did find this:

http://www.merrioncomputing.com/Programming/WatchPrinter.htm

Unfortunately, there's a LOT of bones here.

Thanks!
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Monday, May 11, 2009 2:48 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] With Events? Detect When a Printer Has Completed?

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

-- 
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