|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Determine when report printed to specific printerI need to send a notification email when a report is printed to a specific
printer. I'm not sure how to determine when something is printed to a specific printer. I'm doing this in vba in access 97 and I'm thinking API will be needed, but I'm not sure what and the search terms for the archive are just too broad until I figure out better search criteria. -TIA Matt Matt Williamson wrote:
> I need to send a notification email when a report is printed to a Monitoring the print queue of a printer isn't too difficult, but it can be rather> specific printer. I'm not sure how to determine when something is > printed to a specific printer. I'm doing this in vba in access 97 and > I'm thinking API will be needed, but I'm not sure what and the search > terms for the archive are just too broad until I figure out better > search criteria. involved. To see a VB implementation, have a look at http://vb.mvps.org/samples/PrnInfo. Another approach might be using http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_9sxa.asp, though that gets difficult if your application needs to be doing other stuff too. It's funny that you answered this. I've downloaded all of the examples on
your site and stuck them in an examples directory that I look through any time I need help with something. The majority of the time, I find something that I can modify to make work. I was actually just looking at the example you mentioned before I saw this <g>. The only issue I'm running into is that you enumerate the printers through the VB printers collection in your code, but Access 97 VBA doesn't have a printers collection that I know of. I'm pretty sure I've seen a class module that replaces the Printer object, but I don't remember where. Do you remember seeing it out in the ether somewhere? TIA Matt Show quoteHide quote "Karl E. Peterson" <k***@mvps.org> wrote in message news:OnCVniC0FHA.3256@TK2MSFTNGP09.phx.gbl... > Matt Williamson wrote: >> I need to send a notification email when a report is printed to a >> specific printer. I'm not sure how to determine when something is >> printed to a specific printer. I'm doing this in vba in access 97 and >> I'm thinking API will be needed, but I'm not sure what and the search >> terms for the archive are just too broad until I figure out better >> search criteria. > > Monitoring the print queue of a printer isn't too difficult, but it can be > rather > involved. To see a VB implementation, have a look at > http://vb.mvps.org/samples/PrnInfo. Another approach might be using > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_9sxa.asp, > though that gets difficult if your application needs to be doing other > stuff too. > -- > Working Without a .NET? > http://classicvb.org/petition > > Hi Matt --
>> To see a VB implementation, have a look at Kewl. :-)>> http://vb.mvps.org/samples/PrnInfo. > > It's funny that you answered this. I've downloaded all of the > examples on your site and stuck them in an examples directory that I > look through any time I need help with something. The majority of the > time, I find something that I can modify to make work. > I was actually just looking at the example you mentioned before I saw > this <g>. > The only issue I'm running into is that you enumerate the printers Ummm, same example? <vbg>> through the VB printers collection in your code, but Access 97 VBA > doesn't have a printers collection that I know of. I'm pretty sure > I've seen a class module that replaces the Printer object, but I > don't remember where. Do you remember seeing it out in the ether > somewhere? There was a bug in the VB5 printers collection (scroll down to "Bug in VB5 Printers Collection", same page <G>), where if there were more than "so many" printers installed, not all would be included. That class (CPrinters) ought to work in VBA, I believe. Thanks... Karl
Using shellexecute......
Difference in SQL Syntax between Access and MySQL (from VB6 project using ADO) run time error 5 Picture Box Question Activex EXE help Amber Alert Ticker on VB6 Form Help - Single-Select with Listbox... VB IDE Not Integrating Visual SourceSafe Problem Problem offering font selection with listview in regions other than US Can subroutine in VB6 DLL accept array variable argument??? |
|||||||||||||||||||||||