In my program I have the following API
Private Declare Function SetDefaultPrinter Lib "winspool.drv" Alias "SetDefaultPrinterA" (ByVal PrinterName As String) As Boolean
which is called within a loop by
SetDefaultPrinter (Y.DeviceName)
But having finished the coding and...
In my program I have the following API
Private Declare Function SetDefaultPrinter Lib "winspool.drv" Alias "SetDefaultPrinterA" (ByVal PrinterName As String) As Boolean
which is called within a loop by
SetDefaultPrinter (Y.DeviceName)
Sorry to raise this subject...
Sorry to raise this subject again. But having finished the coding and rolling it out to the target machines I find the code fails with the following error " run-time error 453" Can't find dll entry point SetDefaultPrinterA in winspool drv." A search on Microsofts TechNet infers...
vb5prgmr
You solution was perfect. I don't know how much time I have spent on this but I'm glad that, with your help, I now have a solution.
Many thanks for your help
Ian
Hi Jason
Thanks for your suggestion, I have have tried [see code below], but unless I add the line "cdlPrinter.ShowPrinter"
it still outputs to the default printer.
Set OriginalPrinter = Printer
For Each Y In Printers
If UCase(Y.DeviceName) <> UCase("LaserJet 2200...
I want to print a report to all but one of the workstations printers
The code I have used is :
For Each Y In Printers
If UCase(Y.DeviceName) <> UCase("LaserJet 2200 DN") Then
set printer = Y
Set CrxReport = crxApplication.OpenReport (App.Path "\Preport.Rpt")...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.