Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Declare Function SetDefaultPrinter Lib "winspool.drv"

Status
Not open for further replies.

hermanlaksko

Programmer
Aug 26, 2001
944
DK
I can change the default printer - real easy with this code:

Private Declare Function SetDefaultPrinter Lib "winspool.drv" Alias "SetDefaultPrinterA" (ByVal PrinterName As String) As Boolean

Sub SetDef()
Dim PrinterName As String
PrinterName = "HP LaserJet 4 Plus"
SetDefaultPrinter PrinterName
End Sub

The above will set a new def.printer, but, and this is my question how does one change the def. port on the printer also and is there some place where winspool.dev functions are shown I wonder

Thanks in advance

Herman

They say that crime doesn't pay... does that mean my job is a crime?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top