Hello,
J'aimerais savoir s'il est possible d'imprimer un fichier avec la commande ShellExecute en précisant l'imprimante sur laquelle on veut imprimer.
Merci d'avance pour vos réponses.![]()
Hello,
J'aimerais savoir s'il est possible d'imprimer un fichier avec la commande ShellExecute en précisant l'imprimante sur laquelle on veut imprimer.
Merci d'avance pour vos réponses.![]()
Merci google.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 printCommand := 'printto'; Printer.PrinterIndex := MonPrinterIdx; Printer.GetPrinter(Device, Driver, Port, hDeviceMode) ; printerInfo := Format('"%s" "%s" "%s"', [Device, Driver, Port]) ; ShellExecute(Application.Handle, PChar(printCommand), PChar(documentToPrint), PChar(printerInfo), nil, SW_HIDE) ;
Partager