hi,
i am looking for a sample code how to detect default printer in xp/vista.
i have a code for printing into pdf file using bullzip and cannot figure out how to set back original default printer.
thanks.
Private Declare Function GetProfileString Lib "kernel32.dll" Alias "GetProfileStringA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long
...
Dim OldPrinter As String
Dim objPrinter As Printer
Set objPrinter = GetDefaultPrinter()
OldPrinter = objPrinter.DeviceName
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.