How to set the system default printer to Adobe PDF
Posted on July 14, 2011
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 'System & API - How to set the system default printer to Adobe PDF Public Function SetDefaultPrinterToAdobePDF() 'Need to set the Windows Script Host Object Model (/system32/wshom.ocx) reference for this to function. Dim wshObj As New WshNetwork On Error GoTo SetDefaultPrinterToAdobePDF_Error wshObj.SetDefaultPrinter ("Adobe PDF") Set wshObj = Nothing ExitHere: On Error GoTo 0 Exit Function SetDefaultPrinterToAdobePDF_Error: RaiseEvent ErrRepo("SetDefaultPrinterToAdobePDF", Err.Number, _ "Unable to set default printer to Adobe PDF.", False) Err.Clear Resume Next End Function |