Reading the registry
Our custom PDF printer has a flaw which requires the user to configure the printer to print directly to the file otherwise the reports are spooled and printed into the incorrect name.
I used this function to check the setting and warn the user
Function GetPrinter() If fReturnRegKeyValue(HKEY_LOCAL_MACHINE, "SOFTWAREMicrosoftWindows NTCurrentVersionPrintPrintersEMS PDFDsSpooler", "printSpooling") = "PrintWhileSpooling" Then MsgBox "Your printer is not configured correctly. " & vbCrLf & "change the advanced setting to print directly to the printer" Else MsgBox "Your Setting is correct:" & fReturnRegKeyValue(HKEY_LOCAL_MACHINE, "SOFTWAREMicrosoftWindows NTCurrentVersionPrintPrintersEMS PDFDsSpooler", "printSpooling") End If End Function
This uses the function from the access web
Leave a Reply
Want to join the discussion?Feel free to contribute!