+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Select Printer Without Printer Select Dialog

(combit Team) #1
Valid from List & Label 7
How can a printer be specified without showing the printer select dialog ?

This can be achieved using the function LlSetPrinterInPrinterFile():

The function receives the the project name, the name of the printer and a pointer to a valid DEVMODE structure as input parameters. The DEVMODE parameter is optional and can be set to NULL. This means, that the default settings of the printer will be assumed.

The method call could look like this (pseudo code):
retValue = LlSetPrinterInPrinterFile (hJob, LL_PROJECT_LABEL, "TEST.LBL", -1, "My Printer", NULL-Pointer)


Please be aware that you must probably adapt the declaration file, in order to be able to set the last parameter to NULL. Using Visual Basic you must change the declaration of the function:
Change the last parameter from

pDevMode as DEVMODE


to

ByVal pDevMode as Long


Since version 7.0 List & Label ships with an example showing how to use this function.

IDKBTE000543 KBTE000543